archives

2003
janfebmar
aprmayjun
julaugsep
octnovdec
<< 2002   2004 >>

navigate

contact:
gregATpageswithinDOTcom

Make it do anything :: July 28th, 2003 ::

So, my love for mod_rewrite has grown quickly. It will soon reach a fever pitch, and I will want to talk to anyone about mod_rewrite, regardless of whether they care to listen. You have been warned.

Here’s the story. With the new version of the mini-cms that powers this site, I was able to hack off an entire subdirectory of a given URL. Initially I considered this only a good thing, since there is no such thing as a URL that is too clean, nor one that is too short. But then I soon realized that all people with links to those longer, less efficient URL’s were going to get the default 404 page for this site. What to do? Use mod_rewrite, of course. Its swiss-army-knife approach to URL manipulation, powered by regular expressions, allows you to make virtually anything out of anything else. If there is any better tool at a geek’s disposal, I know not what it is.

Now you will find that whether you try to view an article the old way or the new way, you still get the same page.