I’m looking for a way to convert any mobile url to a standard desktop url.
Example:
http://www.google.com/m → http://www.google.com
http://m.facebook.com → http://www.facebook.com
I know this may not be possible because all schemes are custom work, but if there is a fancy solution, it would help!
For my case, a Ruby on Rails or an Objective-C solution would be ideal.
You could check for an
msubdomain by using regular expressions, track redirects (so if someone goes to Facebook.com and it redirects the redirect it back, but obviously you need to only let this happen when it is a mobile redirect), or you could scan the page for tags whose inner HTML says “Desktop Site” or equivalent.All hacky, but with enough care would work 99% of the time.