Posted on 26 June 2007 by jakilevy
404 errors on blogs
I keep wondering “is there a better way?”
So, I just switched up the permalink structure on ww.misnomer.org/blog, a site I manage.
The old permalink structure was
/category/postTitle
Now it is
/date/category/postTitle
Now, I’m getting 404 errors – expectedly.
And people who were linking in or subscribing to RSS feeds can’t find their old posts (because the link structure is different). What’s a blog to do???
Here are my workarounds:
I edited my 404 page to include latest postings and popular postings.
(the 404.php is located in the theme’s directories…)
BTW – this is a good idea for any site you have – you should ALL edit/customize your 404.php page
[thanks to Arun's Blog for the great tips]
HOWEVER, I also wanted visitors to be REDIRECTED.
For example – when you hit this (the old link):
http://www.misnomer.org/blog/general/future-perfect-video-preview/
i want viewers to get redirected to this (the new link):
http://www.misnomer.org/blog/2007/04/11/future-perfect-video-preview/
So I used this code to redirect (instead of editing my .htaccess file):
meta http-equiv=”refresh” content=”2;url=”http://www.misnomer.org/blog/2007/04/11/future-perfect-video-preview/
For more on this meta http-equiv, go to the source :::
http://en.wikipedia.org/wiki/Meta_refresh
The actual steps:
1. ftp into my blog
2. create a directory structure like this :::
/general/future-perfect-video-preview
[i actually had to create a directory “general” and a directory “future-perfect-video-preview”
3. then i created an index.html file and put the file into the directory /future-perfect-video-preview
I made sure it had the in there at the top.
ta-dah!
Now it redirects to my newly structured permalink
i’m also using a plugin called 404 notifier to track 404 errors:
http://alexking.org/projects/wordpress
So, now, whenever a user encounters a 404, I get an email, and I just re-do this crazy process….
Now, the question – Is there a better way to do this???
Sphere: Related Content

Leave a Reply