* '
[tt]redirect|R[/tt] [=code]' (force
redirect)
Prefix Substitution with [tt]
[:thisport]/[/tt] (which makes the new URL a URI) to force a external redirection. If no code is given, a HTTP response of 302 (MOVED TEMPORARILY) will be returned. If you want to use other response codes in the range 300-400, simply specify the appropriate number or use one of the following symbolic names: [tt]temp[/tt] (default), [tt]permanent[/tt], [tt]seeother[/tt]. Use this for rules to canonicalize the URL and return it to the client - to translate ``[tt]/~[/tt]'' into ``[tt]/u/[/tt]'', or to always append a slash to [tt]/u/[/tt]user, etc.
Note: When you use this flag, make sure that the substitution field is a valid URL! Otherwise, you will be redirecting to an invalid location. Remember that this flag on its own will only prepend
[:thisport]/ to the URL, and rewriting will continue. Usually, you will want to stop rewriting at this point, and redirect immediately. To stop rewriting, you should add the 'L' flag.
* '
[tt]last|L[/tt]' (
last rule)
Stop the rewriting process here and don't apply any more rewrite rules. This corresponds to the Perl [tt]last[/tt] command or the [tt]break[/tt] command in C. Use this flag to prevent the currently rewritten URL from being rewritten further by following rules. For example, use it to rewrite the root-path URL ('[tt]/[/tt]') to a real one, e.g., '[tt]/e/www/[/tt]'.