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?

link|improve this question

44% accept rate
feedback

1 Answer

up vote 2 down vote accepted

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).

link|improve this answer
Brilliant, that fixed it. – Steve Mar 7 '11 at 3:16
feedback

Your Answer

 
or
required, but never shown

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