|The Apache HTTP Server Reference Manual
by Apache Software Foundation
Paperback (6"x9"), 862 pages
RRP £19.95 ($29.95)
“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
– Brian Moore
This module uses a rule-based rewriting engine (based on a regular-expression parser) to rewrite requested URLs on the fly. It supports an unlimited number of rules and an unlimited number of attached rule conditions for each rule to provide a really flexible and powerful URL manipulation mechanism. The URL manipulations can depend on various tests, for instance server variables, environment variables, HTTP headers, time stamps and even external database lookups in various formats can be used to achieve granular URL matching.
This module operates on the full URLs (including the path-info part) both in per-server context (httpd.conf) and per-directory context (.htaccess files and <Directory> blocks) and can even generate query-string parts on result. The rewritten result can lead to internal sub-processing, external request redirection or even to an internal proxy throughput.
But all this functionality and flexibility has its drawback: complexity. So don’t expect to understand this entire module in just one day.
- mod_rewrite reference documentation (p. 826)
- Introduction (p. 1115)
- Flags (p. 1127)
- Technical details (p. 1139)
- Rewrite Guide - useful examples (p. 1146)
- Advanced Rewrite Guide - more useful examples (p. 1175)
|ISBN 9781906966034||The Apache HTTP Server Reference Manual||See the print edition|