Question redirects to

  • Posted January 30, 2014

Hey there,

For the life of me I can’t figure out what I’m doing wrong. My setup used to work fine but I’ve been tinkering with some settings and only later did I realise that my Apache (and/or .htacess) were redirecting requests from to

The domain that’s not redirecting is “”. Without the www it works fine, however.

I’m using multiple virtual hosts on my droplet. The other one , (which is a wordpress site) is redirecting fine; i.e. from non-www to www.

Does anyone have any idea which settings i’m misconfiguring? Any help would be greatly appreciated!

pastebin .htaccess and virtual hosts:

Cheers, Toon


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

I guess your issue is easy… <br> <br>add the following code to your .htaccess for each domain if you want; <br> <br>RewriteCond %{HTTP_HOST} ^ <br>RewriteRule (.*)$1 [R=301,L] <br> <br>it is better to have .htaccess file to each domain so that configurations and redirects don’t cause any conflict…

when I go to your domain and type in the browser, this redirect where your domain goes to: <br> <br>I also get an error: Internal Server Error <br> <br>That means your configurations are wrong. you need to reconfigure them again. <br> <br>And again, what are you trying to do with is it redirect it to another domain or with/without www. because it is still not clear what you want to do…!!

Sorry if that wasn’t clear. I want to redirect from www to non-www for all virtual hosts. One domain is already working, and the other( isn’t redirecting - and I don’t know why. Hopefully that clarifies the problem!

I think your request is not clear to me… Look like you either want to redirect your sites from www to none or from none to www. <br> <br>please explain so I can help correctly.