While onsite at a client, I received a request to disable the mobile views for iPad and iPhone for a specific site. In 2007, you ran the command
stsadm –o deactivatefeature -name MobilityRedirect -URL http://blah.com
Which worked a treat… Unfortunately the process in 2010 is a little more complex and has to be repeated across all servers
In 2010, you need to go into the folder C:\inetpub\wwwroot\wss\VirtualDirectories\<sitename>\App_Browsers\
and open up compat.browser with notepad.
Look for this line: <capability name=”isMobileDevice” value=”true” />
Change true to false and save the file – it will now no longer automatically redirect you to the browser version for the device you have changed (the iPhone one is <browser id=”iPhoneSafari” parentID=”AppleSafari”> and the iPod one is <browser id=”iPodSafari” parentID=”AppleSafari”>).
Oh, and here’s a hot tip – don’t “copy & paste” the file to make a backup. As soon as IIS is restarted, the App Pool is recycled or you hit “save” on the changes, it recompiles the files that it finds in this folder that end in .browser – and your site stops with this error:
Easy to fix though – just add .txt to the file name.
Finally, for everyone that quickly sucks in their breath when I speak about changing the file contents – Don’t jump the gun, have another look at the path where these files reside… Still supported, no worries mate!