I have a problem regarding redirection.

It started out as I noticed, my non-www version is redirected to the www version by 302 redirect. Since then, I am trying to figure out why this is happening. I'm using WordPress 3.3.1. The htacces contains the correct, but it seems to be ignored. (At least if I change the RewriteRule to a completely different tld, nothing happens.)

I tried adding

Options +FollowSymlinks
RewriteCond %{HTTP_HOST} !^(www\.|$) [NC]
RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

and I tried using the explicit version putting in the URL (www.dreadfactory.de by the way).

While trying to narrow down what the source of this error may be, I discovered, that every link starting with the non-www version is redirectet via 302 to the root www version. So if I call dreadfactory.de/angebot it redirects to www.dreadfactory.de.

I deactivated every plugin, one by one, and I changed themes. I updated / reset the WordPress permalink stuff and I tried A LOT of different htaccess versions, but the error still remains the same: a 302 redirect where ther should be a 301 redirect.

Since this page is the only page in my webpackage (Hosteurope) with a subdomain, my theory was that maybe the hoster has some differences in his serversetting for domains with subdomains that are not compatible with something I'm doing, but even after deactivating subdomains, the problem still remained.

1 Answer 1


Check the DNS entries, it could be that your host configured your DNS in an unusual way.

What happens without any htaccess in place?


In this case it turned out that Marvin's naked domain and www domain were pointing at different ip's or servers adjusting the DNS settings in the ISP's control panel solved the problem.

  • If I remove the htaccess file, the permalinks don't work anymore. The only thing working without the file is the root page, since the dynamic pages are not rewritten properly anymore. Jan 31, 2012 at 0:18
  • Once you've removed the file, reset permalinks to the default option, if that's working properly we might be able to troubleshoot properly. Did you look at the DNS? Jan 31, 2012 at 0:21
  • Ok, I reset the permalinks to the default option. The issue stays exactly the same, the only difference is the ?=id form of the urls. The DNS lookup via Kloth.net: ' DNS server handling your query: ns1.hans.hosteurope.de DNS server's address: Name: www.dreadfactory.de Address:' Jan 31, 2012 at 0:34
  • 1
    Ok, I managed to change the entries. Now both Domains point to the same IP. The redirect is still not working, but it's a step in the right direction :D Jan 31, 2012 at 21:45
  • 1
    This actually resolved all the redirection issues. It's no doing a proper 301 redirect. :) Jan 31, 2012 at 23:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.