View Single Post
Old 2007-03-24, 10:33 PM   #1
JK
Well you know boys, a nuclear reactor is a lot like women. You just have to read the manual and press the right button
 
Join Date: Nov 2003
Posts: 157
Wordpress 301 Redirect after Permalink Change

I've got a blog that uses wp autoblog and RSS feeds, as well as posts written by me. I want to disallow google from spidering the rss feed content, so I've changed the permalink structure from just /%postname%/ to /%category%/%postname%/, and disallowed the feed category in my robots.txt.

The problem is that now all of the old posts (1000+) will return a 404 error to Google, which is not ideal. I would like to perform a 301 redirect to the new permalink category if the wordpress class wp_query discovers a 404, but the post is actually valid.

Is there a way I can modify the class to do this? Maybe do some kind of mod_rewrite magic?
__________________
To alcohol! The cause of, and solution to, all of life’s problems
JK is offline   Reply With Quote