Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

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

What happens without any htaccess in place?

//update

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.

share|improve this answer
    
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. –  Marvin Pollock Jan 31 '12 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? –  toomanyairmiles Jan 31 '12 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: 217.115.143.140#53 Name: www.dreadfactory.de Address: 80.237.133.31' –  Marvin Pollock Jan 31 '12 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 –  Marvin Pollock Jan 31 '12 at 21:45
1  
This actually resolved all the redirection issues. It's no doing a proper 301 redirect. :) –  Marvin Pollock Jan 31 '12 at 23:01
show 6 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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