.htaccess mobile redirect issues
Posted
by
val
on Pro Webmasters
See other posts from Pro Webmasters
or by val
Published on 2011-05-25T04:02:37Z
Indexed on
2011/06/28
8:31 UTC
Read the original article
Hit count: 207
I'm trying to set up a mobile redirect for a site with 2 subfolders, and I cannot get both to work at the same time.
This is the structure of the site
www.mysite.com/EN/
www.mysite.com/ES/
This is a bilingual site so each subfolder contains the files corresponding to each language version. Then I was using a 301 redirect, and setting up the index in /EN/ as the main index. Everything was getting redirected to it. I was using
DirectoryIndex index.html
Redirect /index.html http://www.mysite.com/EN/index.html
and several Rewritecond to redirect mysite.com and old urls to the new URL.
It worked fine before I decided to add a mobile version -> m.mysite.com. I used the solution provided in http://stackoverflow.com/questions/3680463/mobile-redirect-using-htaccess, and it redirects my mobile version properly, but now the desktop is both working. Besides, my mobile version must be bilingual as well.
© Pro Webmasters or respective owner