Posted May 02, 2011
Okay, trying to get .htaccess rewrites working again, but so far they aren't doing what they should be (despite being the exact same ones that worked prior to having to wipe the server).
The problem is, 3 domains. 1 has it's base domain in /var/www 2 have theirs in /var/www/domain dir/
using:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
www.domain1.com redirects to domain1.com/domain 2 dir/ -- and displays index page for domain 2
www.domain2.com redirects to domain2.com/domain 2 dir -- and throws up dir not found error
www.domain3.com redirects to domain3.com/domain 2 dir -- and throws up dir not found error
Directly entering domain1.com goes to its correct index page
Directly entering domain2.com goes to its correct index page
Directly entering domain3.com goes to domain 2 die -- and throws up dir not found error
Domain 1 and 2 are using apache virtual hosts pointed to the folder that should be used for their home dir. Domain 3 has not yet had a virtual host set up as I'm trying to get domain 2 to work first.
So, any ideas on how to get the bloody redirects working?
The problem is, 3 domains. 1 has it's base domain in /var/www 2 have theirs in /var/www/domain dir/
using:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
www.domain1.com redirects to domain1.com/domain 2 dir/ -- and displays index page for domain 2
www.domain2.com redirects to domain2.com/domain 2 dir -- and throws up dir not found error
www.domain3.com redirects to domain3.com/domain 2 dir -- and throws up dir not found error
Directly entering domain1.com goes to its correct index page
Directly entering domain2.com goes to its correct index page
Directly entering domain3.com goes to domain 2 die -- and throws up dir not found error
Domain 1 and 2 are using apache virtual hosts pointed to the folder that should be used for their home dir. Domain 3 has not yet had a virtual host set up as I'm trying to get domain 2 to work first.
So, any ideas on how to get the bloody redirects working?
This question / problem has been solved by rjspring