I just upgraded my WordPress installation to 2.2.1 – partly because a friend warned me of a fairly dangerous exploit in the previous version. Since I’m hosted with Dreamhost, I use the “upgrade” option they offer in their admin panel, which is a quick and easy way to upgrade to the latest version of WP.
A few weeks ago I moved two of my posts to another blog using the .htaccess file method, but after upgrading to the new version of WordPress, the .htaccess file was apparently overwritten and the 301 redirects no longer worked. It’s a good thing I checked since the posts here were coming up here again, potentially causing duplicate content issues.
Since that’s the 2nd time I’ve had this happen, and since there were only 2 posts that needed to be moved, I decided to create a more fail-safe solution to this problem.
My permanent URL’s had been in this form:
blog.auinteractive.com/quick-introduction-to-hdr-photography/
so I created a directory with that same name and placed an index.php file within it using the following code:
So now if you go to
blog.auinteractive.com/quick-introduction-to-hdr-photography/
it will go to the directory and call
/quick-introduction-to-hdr-photography/index.php
and redirect that post to its rightful new home.
This way, when I upgrade my WordPress or make any changes to my .htaccess file, those directories will stay intact and make sure the posts are properly redirected. As an added precaution, I’d suggest deleting the old posts from the old domain once you see that Googlebot crawled it to prevent duplicate content issues in the future.
I guess another way to avoid this problem would be to backup your .htaccess file before upgrading your WordPress installation – especially if you have many rewrite rules.
P.S. Thanks to DaveN for the tip about using the WordPress code display plugin.
This site runs on Thesis. Yours should too
Are you a blogger that doesn't understand a lot of PHP? Are you looking for a theme with Flexibility, Easy Customizations, Rock Solid SEO, and Outstanding Support?
If so Thesis is for you. Using Thesis you will have more control over layout and design than you ever thought possible. Simply point and click.
For more advanced users Thesis has an intelligent customization system that uses hooks. Using hooks you can use Thesis across all of your sites and never tell it was the same theme. Watch the Thesis Video Tour.

{ 1 trackback }
{ 1 comment… read it below or add one }
Hi, i cant see the code of your index file…