0

I am extremely new to .htaccess files, I am still in the learning process and am copying code that I find around the web to do what I want. Currently I would like to redirect my homepage ONLY via an .htaccess file in the root directory to a mobile version of the homepage. For example, www.mysite.com (which is also www.mysite.com/index.html) gets redirected to www.mysite.com/mobile on mobile devices. The other pages on my site such as www.mysite.com/page1 stay intact and do not undergo a redirect. The few snippets that I tried worked fine for the homepage to /mobile, but then if the user clicked on a link to take them to another page in the site, they got again redirected to the mobile home page forming an endless loop. Any help would be greatly appreciated, and again I'm very new to all of this. Thank you so much for your time.

  • I'd seriously recommend against this as it frustrates me not being able to see the full site. Is it possible for you to make it responsive? – ScottMcGready Jun 19 '14 at 23:46
  • duplicate http://stackoverflow.com/questions/3680463/mobile-redirect-using-htaccess – Jun Rikson Jun 20 '14 at 00:00
  • Thanks for the responses. The mobile homepage is essentially the same as desktop but without a lot of the js that would slow the loading. Thanks for pointing me to the other thread. I don't know enough about the syntax to adapt it from m.domain to domain.com/mobile so maybe I'll change the page to m.domain and try the answer in that thread. – user3758368 Jun 20 '14 at 01:09

0 Answers0