Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

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

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

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.