I have the following directory structure:
site.com/
- index.php
- desktop/
-- index.php
- mobile/
-- index.php
The index.php of site.com redirects to desktop/index.php or mobile/index.php, depending of user platform.
The problem is that I need different subdomains to point to respective directories:
mobile.site.com -> site.com/mobile
desktop.site.com -> site.com/desktop
My application also uses rewrite to make SEO friendly URL's, so I need:
mobile.site.com/login -> site.com/mobile/login
mobile.site.com/user/1 -> site.com/mobile/user/1
...
Any suggestion to .htaccess file?
Thanks in advance.