Hello all,
I have a root like this:
index.php
folder_images
folder_css
folder_website_a
index.php
folder_website_b
index.php
website a and website b share same css and same images
I wish to set a rule so that if one types www.website-a.com he see the index.php in folder_website_a and if one types www.website-b.com he see the index.php in folder_website_b.
This is what I have in htaccess, but it doesn't works. Where is the error?
RewriteEngine On
RewriteCond %{HTTP_HOST} ^website-a.com [NC]
RewriteRule ^(.*)$ http://www.website-a.com/$1 [L,R=301]
RewriteCond %{REQUEST_URI} !^/folder_website_a/.*$
RewriteRule ^(.*)$ /folder_website_a/$1
RewriteCond %{HTTP_HOST} ^website-b.com [NC]
RewriteRule ^(.*)$ http://www.website-b.com/$1 [L,R=301]
RewriteCond %{REQUEST_URI} !^/folder_website_b/.*$
RewriteRule ^(.*)$ /folder_website_b/$1
Thank you,
Luca