Our website was recently re-designed, and we replaced the homepage (index.html) with a new file (index.php). To ensure that links to the old home page are redirected to the new file, we included a 301 redirect from /index.html to /index.php. Works great.
Then, we added a subdomain for our mobile site. The subdomain mobile.oursite.com points to www.oursite.com/mobile
. The homepage for the mobile site is mobile.oursite.com/index.h
tml (or oursite.com/mobile/index.h
The problem is that whenever someone goes to the subdomain, the htaccess file in the root of the site is apparently redirecting /mobile/index.html to the root of our site - so end users trying to access the mobile site are going to the main website instead.
How can I either change the root htaccess file to be more specific and avoid this problem - or add an htaccess file to the /mobile directory to override the rule in the root?