It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
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?
This question / problem has been solved by rjspringimage
Have you tried to include SymLinks?
(as in Options +FollowSymLinks)
avatar
bansama: So, any ideas on how to get the bloody redirects working?
I'm not a UNIX or Apache guru by any means, but one tool that I use all the time for editing various server roles is webmin. My use case was to setup a webserver to answer for all of our other webservers when we took them down for maintenance - from the firewall we directed all web traffic to the tweaked machine and I made it answer calls for any web requests on our domain - basically I redirected the 404 page to the main page to answer for requests, so you should be able to setup the redirect links you are talking about.

It has a TON of options for editing Apache settings, so you might see if what you are trying to accomplish is there... also works great for other server roles.
Post edited May 02, 2011 by rjspring
Yeah Webmin is what I'm using but even then it's far more complicated than it should be. But a friend managed to help track the problem down to the configuration of the virtual servers. So it appears that this issue is now solved.

I'd like to mark both of your posts as solutions for helping, but I can only mark one. Thus I will mark rjspring's post as it's nearest to how the issue was solved.
avatar
bansama: Yeah Webmin is what I'm using but even then it's far more complicated than it should be. But a friend managed to help track the problem down to the configuration of the virtual servers. So it appears that this issue is now solved.

I'd like to mark both of your posts as solutions for helping, but I can only mark one. Thus I will mark rjspring's post as it's nearest to how the issue was solved.
Glad you got it working, webmin has saved me quite a few times in the past or at least pointed me in the right direction.
Glad to see it's working! I hope Didimatic gets "back on its feet" soon enough. Cheers!