Apache mod_rewrite | Search for a title, author or keyword | ||||||||
Apache mod_rewrite Copyright 2010 The Apache Software Foundation. mod_rewrite module uses a rule-based rewriting engine, based on a regular-expression parser, to rewrite requested URLs on the fly. Each rule can have an unlimited number of attached rule conditions, to allow you to rewrite URL based on server variables, environment variables, HTTP headers, or time stamps. A rewrite rule can be invoked in httpd.conf or in .htaccess. Since mod_rewrite is so powerful, it can indeed be rather complex. This authoritative document attempts to allay some of that complexity, and provide highly annoted examples of common scenarios that you may handle with mod_rewrite. But we also attempt to show you when you should not use mod_rewrite, and use other standard Apache features instead, thus avoiding this unnecessary complexity. mod_rewrite should be considered a last resort, when other alternatives are found wanting. Using it when there are simpler alternatives leads to configurations which are confusing, fragile, and hard to maintain. Understanding what other alternatives are available is a very important step towards mod_rewrite mastery. mod_rewrite uses the Perl Compatible Regular Expression vocabulary. In this document, we do not attempt to provide a detailed reference to regular expressions. For that, we recommend the PCRE ( Perl Compatible Regular Expression ) man pages, the Perl regular expression man page, and Mastering Regular Expressions, by Jeffrey Friedl.
|
|||||||||
Apache mod_rewrite | Disclaimer: this link points to content provided by other sites. |