i having problem with .htacess redirect URL's to sub-folders (sub-directory). My Folder Structure was like. i had two directories in my root folder web and sales.
Root
Directory 1 - web/4.5 , Directory 2 - sales/2.5
And my main URL site was like http ://beta.example.com
when user hits the root URL (http ://beta.example.com) it should redirect to sub-folder name web/4.5 for this i wrote code and it was working.the code was like.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^beta.example\.com$
RewriteCond %{REQUEST_URI} !^/web/4.5
RewriteRule (.*) /web/4.5/$1
the above code was working but, when user hits the root URL (http ://beta.example.com/sales/) it should redirect to sub-folder sales/2.5 for this i wrote code and it was not working.the code was like.
RewriteEngine On
RewriteRule ^sales/(.*) sales/2.5/$1
RewriteCond %{HTTP_HOST} ^beta.example\.com$
RewriteCond %{REQUEST_URI} !^/web/4.5
RewriteRule (.*) /web/4.5/$1
it was not working ,it goes to web/4.5/sales/2.5/ ,actually it goes to /sales/2.5/
-
-