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 sitewww.example.com/EN/www.example.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.htmlRedirect /index.html http://www.example.com/EN/index.htmland several RewriteCond to redirect example.com and old URLs to the new URL.It worked fine before I decided to add a mobile version to m.example.com.I used the solution provided in https://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.I'll do my best to clarify.My site is bilingual. I've created two subfolders (EN and ES) to hold the contents for each language.My desktop site requires some kind of redirect to find the right index (one of them at least, so I decided to set the English language version as the main index). The script I used is as stated above.Now, when I added mobile detection redirect (and it does take me to the mobile version on a mobile device), it seems to go to the usual default index on the desktop (www.example.com/index.html) which is not my desktop index.Any suggestions?
.htaccess mobile redirect issues
htaccess;redirects;mobile