0

I've moved my Wordpress from one domain to another, and I want the use .htaccess 301 redirects to redirect posts on the old domain to posts on the new domain.

My webhost suggested I try the following:

 Options +FollowSymlinks
 RewriteEngine On
 RewriteCond %{HTTP_HOST} ^(www\.)?steve\.doig\.com\.au/wordpress/$ [NC]
 RewriteRule ^(.*)$ http://www.superlogical.net/$1 [R=301,L]

This works only for the /wordpress folder, but not for any of the category pages or posts.

What is wrong here?

2

This line RewriteCond %{HTTP_HOST} ^(www\.)?steve\.doig\.com\.au/wordpress/$ [NC] is setting a condition on the rewrite process. Basically it only works on urls finished with /wordpress/. Try commenting that line (if you only have the Wordpress installation running, it will redirect everything).

  • Brilliant, that fixed it. – Steve Mar 7 '11 at 3:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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