2015年3月14日

JavaScript:Redirect website to mobile version for separate url

This is modified from http://www.inmotionhosting.com/support/website/redirects/mobile-redirect.


Original:  will redirect all files to the index file.  


 



Modified: will redirect to each specific file in mobile version.
 

Note:
Suppose your site's url is : domain.com
Change domain to your site's domain.



Examlple:

domain.com/index.html  ===  m.domain.com/index.html
domain.com/whatever.html   === m.domain.com/whatever.html

沒有留言: