How can I rewrite an URL, so when I type
http://mydomain.com/index.php
is the same as
http://mydomain.com/subdomain/index.php
If you just want to handle index.php
then following will work:
RewriteEngine On
RewriteRule ^(index\.php|)$ subdomain/$1 [L]
However if you want to redirect every request subdomain folder
then following will work:
RewriteEngine On
RewriteRule ^(?!subdomain/).*$ subdomain%{REQUEST_URI} [L,NC]
Try something like this:
RewriteEngine On
RewriteRule ^$ /subdomain [L]