As we all know that SharePoint creates a very basic (ugly looking) default site for mobile devices. When opening the site from any mobile browser, it automatically directs the website to the respective mobile website which has /m appended to it.
My client did not wanted the default mobile site to open within mobile devices as it gives a very untidy look so they wanted to disable the redirect function. If you have similar issues, follow the steps below to disable the redirection.
- Navigate to:
- <userAgent match=”iPhone”>
- Now under tag, locate
- <capability name=”isMobileDevice” value=”true”/>
- Change this to false
- Now for Android, repeat the same thing and set the ismobileDevice attribute to false.
No need to reset the iis or anything else. Just save the file and browse the site from iphone, you will see the desktop site opening.
Also, I noticed that if you create a backup copy of the file with any name within the folder, the site breaks and doesn’t render. So make changes within the file and copy it to some other location for a backup copy.
There is a MobilityRedirect feature within the SPWeb which can be disabled to prevent the redirection as well.
- Disable-SPFeature –Identity MobilityRedirect –Url
Hope this helps someone