SharePoint 2010 Branding: The application.master master page

In SharePoint 2010 a small number of pages still uses the application.master (for example: /_layouts/listkeywords.aspx). All the pages stored in the layouts folder in the 14 hive use the application.master. This sucks if you want to brand these pages.

Searching a bit I found this Microsoft article that gives a couple of methods (and even recommends one) for changing the application.master file in the file system (which unsupported operation for SharePoint).  If Microsoft explains how to do it and even recommends it, I'm not looking back. I'm changing the application.master in the file system.

I'm also going to make this process automatic by deploying both the edited and backed up application master page from my Visual Studio 2010 solution. So in case of disaster the original version of the file is backed up on the server. Here's how it looks:

You might also need to deploy the application.master (if your portal supports UI version 3). And, as always respect the file, don't just copy stuff indiscriminately from other master pages. Use the controls that are already there. Just change the layout the same way you would for the standard master page.

You can also do this in a much more appropriate and supported fashion, using an HTTP Module. You can find extensive information about it if you do a bit of internet search.