All articles tagged: mod_rewrite

Apache mod_rewrite RewriteRule Flags

In standard regular expression syntax, there are a number of flags that can be added to the end of a regex pattern. In mod_rewrite, some of these standard regular expression flags, as well as some others more specific to URL handling, may appear at the end of the rule in square brackets in order to modify the behavior of a rewrite rule:

When to Use Apache mod_rewrite

Mod_rewrite is for rewriting and redirecting URLs dynamically, using powerful pattern matching to allow for handling of very complex situations. It becomes difficult to give a better definition than that, largely because the uses ofmod_rewrite are almost as numerous as the people who use it.