0

I'm helping a friend recover from the mess outsourcing a wordpress website caused him (mistake #1) and I have this weird error. The hosting he is using appears to be redirecting www.domain.com to domain.com (NFI why) automatically which works fine in every browser except IE (i know right!). So adding the first redirect fixed that, until I added the permalink redirect. Now when IE goes to an old wordpress link like http://www.domain.com/?p=520 the redirect fails.

RewriteEngine On
RewriteBase /

# Rewrite rule for wierd redirect issue
RewriteCond %{HTTP_HOST} ^www.domain.com$
RewriteRule ^/?(.*)$ "http\:\/\/doman\.com\/$1" [R=301,L]

# Rewrite Rule for Wordress Permalinks
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

I tested this out with wget and it complains:

ERROR: Redirection (301) without location.

So it seems likely that IE is suffering from the same error (without the helpful error message). But I haven't a clue how to fix it. I am hoping that he will switch hosting companies but we will see. In the meantime any ideas?

Aaron
  • 2,968
  • 1
  • 23
  • 36
  • Does http://domain.com/?p=520 work? Without the redirect, does http://www.domain.com/?p=520 forward to http://domain.com/?p=520 – Dave Drager Sep 29 '09 at 16:24
  • In IE 301 Redirect fails to work for
    www.domain.com/?p=520
    –  Sep 30 '09 at 00:15

1 Answers1

1

You need to change this in the Wordpress settings.

  1. Change General Settings => add www if you need it
  2. Change permalinks structure
  3. Clear cache
  4. Remove any plugins that might redirect
  5. Check your hosting panel for any redirects and disable
  6. Remove your rules and add the standard rules to the htaccess file

I wouldn't waste time with writing rules, it's better if you fix the problems in Wordpress and disable any redirect plugins, because that's what it sounds like

mashup
  • 330
  • 1
  • 14