We made subdirectory site.com/mobile and want subdomain m.site.com to point to site.com/mobile.
with .htaccess in root
# redirect no-www to www
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(?!www\.)(.+) [NC]
RewriteRule ^(.*) http
://www.%1/$1 [R=301,NE,L]
subdomain
m.site.com
spins to
www.m.site.com/mobile
Inside mobile subdirectory there is no .htaccess
At the same time other subdomain blog.site.com works correctly with his subdirectory site.com/blog/
This .htacces is inside site.com/blog
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Please advise. We are getting crazy over this! What we are doing wrong?
[edited by: phranque at 4:38 am (utc) on Nov 29, 2013]
[edit reason] unlinked url for clarity [/edit]