I have an interesting problem...
ona domain name i have a bunch of folders and I am making subdomains out of them...
So what I have is this
www.mydomain.com/somefolder/
and i mod_rewrite to this
somefolder.mydomain.com
To do that I am using this mod_rewrite and it works till that point:
RewriteEngine On
RewriteRule ^\.htaccess$ - [F]
RewriteCond %{HTTP_HOST} !^www\.mydomain\.com?$
RewriteCond %{HTTP_HOST} ^([^.]+)\.mydomain\.com?$
RewriteRule ^$ /%1/[L]
However a strange thing happens whan I click on a link on the loaded page. The page doesn't open,,, I get file not found browser error. The I tried accessing the desired file like this
somefolder.mydomain.com/somefolder/somefile.html AND IT WORKED
but I don't want it to work like that... I want this
somefolder.mydomain.com/somefile.html
As a reminder,,, the index file does load on subdomain as long as I am not calling it directly by index.html.
I do realise I am missing somethhing in my mode_rewrite,,, but I am not a savy mod rewrite programmer so I need help.
What am I missing in that mod code?
PLeae help. and THANKS IN ADVANCE!