Another task in my quest to develop a half decent web site was getting my head around Apache Mod Rewrite again.
For anyone that’s bemused at this point, a rewrite engine is a piece of software that can modify a web address’ appearance (or rewrite it). To end users it means that they can type in a user friendly address such as www.example.com/page/ and behind the scenes something like www.example.com/index.php?name=page is passed to the web server. Advantages include obfuscation of the technology driving your web site (to an extent), more user friendly URLs (easier to remember, guess and nicer to look at) and better SEO.
This is the trusty Mod Rewrite syntax reference I always refer to.
My favourite (and strangely accurate) mod_rewrite quotes:
“Despite the tons of examples and docs, mod_rewrite is voodoo. Damned cool voodoo, but still voodoo.” — Brian Moore
“The great thing about mod_rewrite is it gives you all the configurability and flexibility of Sendmail. The downside to mod_rewrite is that it gives you all the configurability and flexibility of Sendmail.” — Brian Behlendorf, Apache Group
Is it really a good thing to have favourite mod_rewrite quotes? :p
Just wait ’til you’ve battled with the dreaded “Server Misconfiguration” error for a good few hours. By then the quotes will seem a welcome release!