I have again a little problem with this complex HtAccess
I want to create a "dev" folder for all my sites, for can programming without perturbate the real site in folder "web"
So at the begining, the DEV folder is the exact copy of the WEB folder, and all the sites are managed like this on my server
domain.com/folder1/folder2/folder3/dev/MySite/index.php
domain.com/folder1/folder2/folder3/web/MySite/index.php
Then, if i have for example this subdomain
Code: Select all
http://mysite.domain.com
domain.com/folder1/folder2/folder3/web/MySite/index.php
with this RULE :
Code: Select all
RewriteRule "^SITE" "/folder1/folder2/folder3/web/MySite/index.php"
That woks nice, but now...i want create a RULE for explain that if i write :
http://dev.mysite.domain.com
http://dev.mysite2.domain.com
etc ...
So adding "dev." before each normal adress
HtAccess must modify the adress of
domain.com/folder1/folder2/folder3/web/MySite/index.php
to
domain.com/folder1/folder2/folder3/dev/MySite2/index.php
If someone have an idea for do this miracle ?
I wish you a very good night