I’ve updated the permalink structure on this blog. What’s this mean for you? Nothing really, unless you had some pages bookmarked. If you did have some pages at this blog bookmarked, they’ll no longer load to the right page. My permalinks used to look like this: http://longren.org/archives/2182
Now, they look something like this:
There’s no real benefit gained from this change, I just like the look of the new permalink structure better. Now, the only problem with making this change is search engines still see the old permalink structure, as expected. So, when someone searches google for Slackware 11, they will see a link to http://www.longren.org/archives/2156.
Well, the /archives/2156 page no longer exists here. However, there is an /archives/ page. I’ve added a slight bit of intelligence to the /archives/ page. If a user ends up at www.longren.org/archives/2156/, the archives page will try to find the post they’re really looking for.
Now, this works very well for people coming in from search engines or other blogs that have linked here. Any time the archives page sees a number at the end, /archives/2156, for example, it assumes the number is a postid, which is usually is. So, after that, the PHP code fetches the new URL for the post id and then grabs the post title and provides a link to the new URL.
Here’s the PHP I used to make this happen:
post_title; print "
"; } ?>
Not very pretty, I know, but it gets the job done. Oh, and I really like this Code Autoescape plugin.
Well, now what?
Work with Me
I'm available for hire and always taking new clients, big and small. Got a project or an idea you'd like to discuss? Startup plan but no developer to make it happen? Just get in touch, I'd love to see if I can help you out!