I hope you can help me please
I have multiple sites hosted on a shared server, and although the following .htaccess works, it doesn't work perfectly.
The problem is that when something is refreshed with a meta refresh, I get http://domain1.com/www.domain1.net/foo.php whereas I don't want want the "/www.domain1.net" ... similaly, I can request another site from another, with for example: http://domain1.net/www.domain2.net will load domain2 (again, not good)
Any ideas?
- Code: Select all
# Error handling
ErrorDocument 404 /404.php
# Blacklist
order allow,deny
deny from 61.6.192.
deny from 61.6.226.
deny from .bn
allow from all
# Rewrite engine
RewriteEngine on
RewriteCond %{HTTP_HOST} domain1\.net$ [NC]
RewriteRule ^(.*)$ /www.domain1.net/$1 [L]
RewriteCond %{HTTP_HOST} domain2\.net$ [NC]
RewriteRule ^(.*)$ /www.domain2.net/$1 [L]
RewriteCond %{HTTP_HOST} domain3\.net$ [NC]
RewriteRule ^(.*)$ /www.domain3.net/$1 [L]