Why didn’t I think of this sooner!?

So I was giving myself a hard time by manually adding .htaccess match conditions whenever there was a 404 (file not found) error reported 1 which was related to the old permalink formats I used in my MovableType days.

I realized just how much of an idiot I was when I could’ve used regular expressions. As such, I was able to replace all of them with just these five lines of code:

RedirectMatch permanent ^/blog/archives/(.*)/([0-9]{4})_([0-9]{2})_([0-9]{2})(.*)\.php$ http://nargalzius.com/blog/archives/$2/$3/$4
RedirectMatch permanent ^/blog/archives/(.*)/index_([0-9]{4})\.php$ http://nargalzius.com/blog/archives/$2
RedirectMatch permanent ^/blog/archives/(.*)/index_([0-9]{4})_([0-9]{2})\.php$ http://nargalzius.com/blog/archives/$2/$3
RedirectMatch permanent ^/blog/archives/(.*)/index_([0-9]{4})_([0-9]{2})_([0-9]{2})\.php$ http://nargalzius.com/blog/archives/$2/$3/$4
RedirectMatch permanent ^/blog/archives/([a-z]{1,})($|/$) http://nargalzius.com/blog/archives/category/$1

Let’s break them down shall we? Read More

Notes

Notes
1 which was related to the old permalink formats I used in my MovableType days.

Webstuff

Here’s some webstuff for you. I would have to say Digg is a pretty good source for interesting news. Not necessarily new, or useful, but interesting nonetheless. After all, that’s the whole point of their social bookmarking approach – to see what people in general find interesting.

Anyways, just don’t be surprised that a lot of the things I post would be coming from the said site.

Read More

WebStuff!

When was the last time I posted some webstuff? Well the post right before this one was, but I mean like my usual “webstuff” webstuff. So now I’m posting some stuff I came across, in no particular order, some of which may be old news which I just decided to comment on today.

Read More