Hiding a ribbon button when specific Dynamics CRM Web Resource is in context
Like most of dynamics crm programmers know, we can add "web resources that are not associated with any entity" to the sitemap. If such a customization is made, when user clicks that link, web resource will be opened and the buttons in the application ribbon will be added to the ribbon section of the dynamics crm.
What I am wondering is if there is any way I can hide this global buttons that are in the application ribbon based on the web resource on the page.
Let's say I added more than one web resources to my sitemap, namely a.htm and b.htm. Let's say I have a custom button named x in the application ribbon. Right now x is displayed both for a.htm and b.htm, but in reality I would like to hide the button when user clicks on b.htm from the sitemap.