Lewis' Blog Tales from the trenches of information technology

3Dec/110

Wrestling with Apache’s mod_rewrite

mod_rewrite is a great (read: extremely useful) module. For those who may be unfamiliar with its amazing abilities, unlike mod_alias, mod_rewrite actually re-writes a given url, so that

http://www.mydomain.com/some%20ridiculous%20url%20with%20spaces%20in%20it.html

turns into

http://www.mydomain.com/this

and other such wonderful things, completely replacing what would otherwise be visible to the browser's url bar and to search engines. Thus, this becomes a staple of the "Search Engine Friendly" url contingent for CMS-driven sites (such as those hosted under Joomla! and WordPress, for example).