![]() |
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? |
I was looking for something similar, but didn't seem to work with regular htaccess file.
|
Quote:
|
Thanks Walrus :D
All I needed to do was search for the magic word permalink "migration" not "change, alter, new" etc. Unfortunately I couldn't get it to work properly, the old posts were performing a 301 redirect to the correct location, however all the posts were returning a 404 error. I'll play around with it a bit more to see if I can figure it out, but it seems there's a few people with the same problems as me. It's worth mentioning that if you are going to use this plugin, make sure you do it before you change the permalink structure. Very handy plugin to have. |
All times are GMT -4. The time now is 02:54 PM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc