I'm the admin of an apache server (on a hosting package that allows me to host multiple domains), I've got one domain in public_html
(let's call it www.ROOTwebsite.com) and 9 other domains hosted in a folder in the same directory level as the public_html
, called DOMAINS
.
So the structure is:
-DOMAINS/site1.com/
/site2.com/ ... etc
-public_html
I'm using '/'
in the beginning of all relative paths in wamp for site1.com
(for example /menu.php) and it works fine, but when I upload to DOMAINS/site1.com/ it messes up the site because it obviously is looking at the public_html
directory as the ROOT.
I've used a number of combinations on the following in the .htaccess file, but I can't figure out which is the right syntax to change the ROOT to a directory sitting NEXT to public_html, not under it as usual:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.ROOTwebsite.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^ROOTwebsite.gr$
RewriteCond %{REQUEST_URI} !DOMAINS/site1.com/
RewriteRule (.*) /DOMAINS/site1.com/$1 [L]
I wish to change the root directory for site1.com
so that it also works with the '/'
, without affecting the public_html
website.
Can anyone see the problem with the code above?