The Definitive Guide to Apache mod_rewrite by Rich Bowen leaves nothing to be desired. After pointing out when not to use mod_rewrite, a chapter on regular expressions and one on installing and configuring mod_rewrite (both statically and as a dynamic object), the author digs right in to the RewriteRule directive with clear examples for doing simple and more complex redirection. Chapter five expands on those rules with the RewriteCond directive illustrating its strength with time-based redirection (different pages day & night) and how to solve the “image theft” problem, and chapter six lays out the RewriteMap directive which allows to map URLs based on external data; I again found some very good examples here. The next two chapters cover real-world examples which include adjusting URLs, reorganization of content, forcing SSL, and serving content based on a username. Access control, virtual hosts (yes, using mod_rewrite!), proxying and debugging make up the remaining chapters which are packed full of information (a lot of which I didn’t know about). I think that The Definitive Guide to Apache mod_rewrite really is just that: definitive. It is a must have for any systems administrator who wants to use mod_rewrite on an Apache web server, and I strongly recommend it.

Books and Apache :: 19 Jun 2006 :: e-mail


blog comments powered by Disqus