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.

Beefing up the comment form

I added two things on the comment form:

  1. Live comment preview – shows immediate feedback on how your comment would look like after posting (which is why I took out the “preview” button)
  2. Security captcha – anti-spambot mechanism. I know it’s not foolproof, but it does the job most of the time

Don’t mind this post (CSS Test)

I just posted so I can put all the “features” of Markdown, Smartypants, and Bo in one entry on the front page so I can style the site properly without having to change the archive pages just yet. You may disregard this post…

However, you may also check out the entry just to see the different element stylings. (e.g. quotes, code, footnotes, etc. etc.)

Let me just warn you though, since I’m doing this on the fly; I’m pretty sure this will keep on changing just in case you catch me editing the CSS (or if it breaks the page now and then). Read More