mod_rewrite.xml revision d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacd
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder<!DOCTYPE modulesynopsis SYSTEM "/style/modulesynopsis.dtd">
1a6464613c59e35072b90ca296ae402cbe956144Christian Maeder<?xml-stylesheet type="text/xsl" href="/style/manual.en.xsl"?>
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder Copyright 2002-2004 Apache Software Foundation
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder Licensed under the Apache License, Version 2.0 (the "License");
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder you may not use this file except in compliance with the License.
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder You may obtain a copy of the License at
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder Unless required by applicable law or agreed to in writing, software
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder distributed under the License is distributed on an "AS IS" BASIS,
b9625461755578f3eed04676d42a63fd2caebd0cChristian Maeder WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
b9625461755578f3eed04676d42a63fd2caebd0cChristian Maeder See the License for the specific language governing permissions and
09a67ca9b5cdf09e06470d4c965484783e2963f4Christian Maeder limitations under the License.
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder<modulesynopsis metafile="mod_rewrite.xml.meta">
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder<description>Provides a rule-based rewriting engine to rewrite requested
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederURLs on the fly</description>
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder<compatibility>Available in Apache 1.3 and later</compatibility>
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder <p>``The great thing about mod_rewrite is it gives you
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder all the configurability and flexibility of Sendmail.
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder The downside to mod_rewrite is that it gives you all
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder the configurability and flexibility of Sendmail.''</p>
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder <p class="cite">-- <cite>Brian Behlendorf</cite><br />
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder Apache Group</p>
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder </blockquote>
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder <p>`` Despite the tons of examples and docs,
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder mod_rewrite is voodoo. Damned cool voodoo, but still
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder voodoo. ''</p>
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder <p class="cite">-- <cite>Brian Moore</cite><br />
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder bem@news.cmc.net</p>
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder </blockquote>
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder <p>Welcome to mod_rewrite, the Swiss Army Knife of URL
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder manipulation!</p>
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder <p>This module uses a rule-based rewriting engine (based on a
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder regular-expression parser) to rewrite requested URLs on the
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder fly. It supports an unlimited number of rules and an
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder unlimited number of attached rule conditions for each rule to
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder provide a really flexible and powerful URL manipulation
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder mechanism. The URL manipulations can depend on various tests,
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder for instance server variables, environment variables, HTTP
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder headers, time stamps and even external database lookups in
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder various formats can be used to achieve a really granular URL
0e012772df2ce0dc7e8f0fe3acf458c2871dcfbcChristian Maeder matching.</p>
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder <p>This module operates on the full URLs (including the
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder path-info part) both in per-server context
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder (<code>httpd.conf</code>) and per-directory context
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder (<code>.htaccess</code>) and can even generate query-string
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder parts on result. The rewritten result can lead to internal
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder sub-processing, external request redirection or even to an
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder internal proxy throughput.</p>
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder <p>But all this functionality and flexibility has its
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder drawback: complexity. So don't expect to understand this
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder entire module in just one day.</p>
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder <p>This module was invented and originally written in April
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder 1996 and gifted exclusively to the The Apache Group in July 1997
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder <a href="http://www.engelschall.com/"><code>Ralf S.
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder href="mailto:rse@engelschall.com"><code>rse@engelschall.com</code></a><br />
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder href="http://www.engelschall.com/"><code>www.engelschall.com</code></a>
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder<section id="Internal"><title>Internal Processing</title>
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder <p>The internal processing of this module is very complex but
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder needs to be explained once even to the average user to avoid
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder common mistakes and to let you exploit its full
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder functionality.</p>
ef67402074be14deb95e4ff564737d5593144130Klaus Luettich<section id="InternalAPI"><title>API Phases</title>
ef67402074be14deb95e4ff564737d5593144130Klaus Luettich <p>First you have to understand that when Apache processes a
ef67402074be14deb95e4ff564737d5593144130Klaus Luettich HTTP request it does this in phases. A hook for each of these
ef67402074be14deb95e4ff564737d5593144130Klaus Luettich phases is provided by the Apache API. Mod_rewrite uses two of
725a68ec81cba9b8aa8647bebfb5baa449803e7eKlaus Luettich these hooks: the URL-to-filename translation hook which is
ef67402074be14deb95e4ff564737d5593144130Klaus Luettich used after the HTTP request has been read but before any
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder authorization starts and the Fixup hook which is triggered
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder after the authorization phases and after the per-directory
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder config files (<code>.htaccess</code>) have been read, but
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder before the content handler is activated.</p>
b9625461755578f3eed04676d42a63fd2caebd0cChristian Maeder <p>So, after a request comes in and Apache has determined the
26f228bf3a3fea810223396e5794c217a79a8d5bChristian Maeder corresponding server (or virtual server) the rewriting engine
b9625461755578f3eed04676d42a63fd2caebd0cChristian Maeder starts processing of all mod_rewrite directives from the
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder per-server configuration in the URL-to-filename phase. A few
b9625461755578f3eed04676d42a63fd2caebd0cChristian Maeder steps later when the final data directories are found, the
b9625461755578f3eed04676d42a63fd2caebd0cChristian Maeder per-directory configuration directives of mod_rewrite are
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder triggered in the Fixup phase. In both situations mod_rewrite
470ca7a2797069ae4b27c34c1b71419f67be1f84Christian Maeder rewrites URLs either to new URLs or to filenames, although
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder there is no obvious distinction between them. This is a usage
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder of the API which was not intended to be this way when the API
d67a33b40578beef2e255a274f89bb9c34aaf056Christian Maeder was designed, but as of Apache 1.x this is the only way
d67a33b40578beef2e255a274f89bb9c34aaf056Christian Maeder mod_rewrite can operate. To make this point more clear
26f228bf3a3fea810223396e5794c217a79a8d5bChristian Maeder remember the following two points:</p>
26f228bf3a3fea810223396e5794c217a79a8d5bChristian Maeder <li>Although mod_rewrite rewrites URLs to URLs, URLs to
ba904a15082557e939db689fcfba0c68c9a4f740Christian Maeder filenames and even filenames to filenames, the API
ba904a15082557e939db689fcfba0c68c9a4f740Christian Maeder currently provides only a URL-to-filename hook. In Apache
ba904a15082557e939db689fcfba0c68c9a4f740Christian Maeder 2.0 the two missing hooks will be added to make the
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder processing more clear. But this point has no drawbacks for
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder the user, it is just a fact which should be remembered:
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder Apache does more in the URL-to-filename hook than the API
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder intends for it.</li>
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder Unbelievably mod_rewrite provides URL manipulations in
b9625461755578f3eed04676d42a63fd2caebd0cChristian Maeder per-directory context, <em>i.e.</em>, within
b9625461755578f3eed04676d42a63fd2caebd0cChristian Maeder <code>.htaccess</code> files, although these are reached
b9625461755578f3eed04676d42a63fd2caebd0cChristian Maeder a very long time after the URLs have been translated to
b9625461755578f3eed04676d42a63fd2caebd0cChristian Maeder filenames. It has to be this way because
b9625461755578f3eed04676d42a63fd2caebd0cChristian Maeder <code>.htaccess</code> files live in the filesystem, so
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder processing has already reached this stage. In other
b9625461755578f3eed04676d42a63fd2caebd0cChristian Maeder words: According to the API phases at this time it is too
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder late for any URL manipulations. To overcome this chicken
b9625461755578f3eed04676d42a63fd2caebd0cChristian Maeder and egg problem mod_rewrite uses a trick: When you
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder manipulate a URL/filename in per-directory context
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder mod_rewrite first rewrites the filename back to its
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder corresponding URL (which is usually impossible, but see
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder the <code>RewriteBase</code> directive below for the
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder trick to achieve this) and then initiates a new internal
49ad22e8dae6b1ed8733a8bada2538d4713ceb34Christian Maeder sub-request with the new URL. This restarts processing of
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder the API phases.
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder <p>Again mod_rewrite tries hard to make this complicated
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder step totally transparent to the user, but you should
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder remember here: While URL manipulations in per-server
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder context are really fast and efficient, per-directory
470ca7a2797069ae4b27c34c1b71419f67be1f84Christian Maeder rewrites are slow and inefficient due to this chicken and
470ca7a2797069ae4b27c34c1b71419f67be1f84Christian Maeder egg problem. But on the other hand this is the only way
470ca7a2797069ae4b27c34c1b71419f67be1f84Christian Maeder mod_rewrite can provide (locally restricted) URL
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder manipulations to the average user.</p>
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder<section id="InternalRuleset"><title>Ruleset Processing</title>
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder <p>Now when mod_rewrite is triggered in these two API phases, it
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder reads the configured rulesets from its configuration
470ca7a2797069ae4b27c34c1b71419f67be1f84Christian Maeder structure (which itself was either created on startup for
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder per-server context or during the directory walk of the Apache
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder kernel for per-directory context). Then the URL rewriting
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder engine is started with the contained ruleset (one or more
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder rules together with their conditions). The operation of the
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder URL rewriting engine itself is exactly the same for both
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder configuration contexts. Only the final result processing is
d67a33b40578beef2e255a274f89bb9c34aaf056Christian Maeder different. </p>
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder <p>The order of rules in the ruleset is important because the
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder rewriting engine processes them in a special (and not very
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder obvious) order. The rule is this: The rewriting engine loops
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder through the ruleset rule by rule (<directive
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder module="mod_rewrite">RewriteRule</directive> directives) and
d67a33b40578beef2e255a274f89bb9c34aaf056Christian Maeder when a particular rule matches it optionally loops through
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder existing corresponding conditions (<code>RewriteCond</code>
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder directives). For historical reasons the conditions are given
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder first, and so the control flow is a little bit long-winded. See
d67a33b40578beef2e255a274f89bb9c34aaf056Christian Maeder Figure 1 for more details.</p>
d67a33b40578beef2e255a274f89bb9c34aaf056Christian Maeder <img src="/images/mod_rewrite_fig1.gif" width="428"
d67a33b40578beef2e255a274f89bb9c34aaf056Christian Maeder height="385" alt="[Needs graphics capability to display]" /><br />
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder <dfn>Figure 1:</dfn>The control flow through the rewriting ruleset
d67a33b40578beef2e255a274f89bb9c34aaf056Christian Maeder <p>As you can see, first the URL is matched against the
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder <em>Pattern</em> of each rule. When it fails mod_rewrite
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder immediately stops processing this rule and continues with the
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder next rule. If the <em>Pattern</em> matches, mod_rewrite looks
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder for corresponding rule conditions. If none are present, it
5d6ee210ac97051e4d1830d4c346d8a8db01a6b5Christian Maeder just substitutes the URL with a new value which is
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder constructed from the string <em>Substitution</em> and goes on
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder with its rule-looping. But if conditions exist, it starts an
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder inner loop for processing them in the order that they are
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder listed. For conditions the logic is different: we don't match
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder a pattern against the current URL. Instead we first create a
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder string <em>TestString</em> by expanding variables,
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder back-references, map lookups, <em>etc.</em> and then we try
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder to match <em>CondPattern</em> against it. If the pattern
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder doesn't match, the complete set of conditions and the
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder corresponding rule fails. If the pattern matches, then the
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder next condition is processed until no more conditions are
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder available. If all conditions match, processing is continued
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder with the substitution of the URL with
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder<section id="quoting"><title>Quoting Special Characters</title>
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder <p>As of Apache 1.3.20, special characters in
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder <em>TestString</em> and <em>Substitution</em> strings can be
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder escaped (that is, treated as normal characters without their
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder usual special meaning) by prefixing them with a slosh ('\')
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder character. In other words, you can include an actual
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder dollar-sign character in a <em>Substitution</em> string by
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder using '<code>\$</code>'; this keeps mod_rewrite from trying
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder to treat it as a backreference.</p>
d67a33b40578beef2e255a274f89bb9c34aaf056Christian Maeder<section id="InternalBackRefs"><title>Regex Back-Reference Availability</title>
d67a33b40578beef2e255a274f89bb9c34aaf056Christian Maeder <p>One important thing here has to be remembered: Whenever you
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder use parentheses in <em>Pattern</em> or in one of the
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder <em>CondPattern</em>, back-references are internally created
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder which can be used with the strings <code>$N</code> and
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder <code>%N</code> (see below). These are available for creating
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder the strings <em>Substitution</em> and <em>TestString</em>.
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder Figure 2 shows to which locations the back-references are
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder transfered for expansion.</p>
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder <img src="/images/mod_rewrite_fig2.gif" width="381"
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder height="179" alt="[Needs graphics capability to display]" /><br />
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder <dfn>Figure 2:</dfn> The back-reference flow through a rule.
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder <p>We know this was a crash course on mod_rewrite's internal
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder processing. But you will benefit from this knowledge when
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder reading the following documentation of the available
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder directives.</p>
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder<section id="EnvVar"><title>Environment Variables</title>
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder <p>This module keeps track of two additional (non-standard)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder CGI/SSI environment variables named <code>SCRIPT_URL</code>
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder and <code>SCRIPT_URI</code>. These contain the
1a6464613c59e35072b90ca296ae402cbe956144Christian Maeder <em>logical</em> Web-view to the current resource, while the
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder standard CGI/SSI variables <code>SCRIPT_NAME</code> and
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder <code>SCRIPT_FILENAME</code> contain the <em>physical</em>
1a6464613c59e35072b90ca296ae402cbe956144Christian Maeder System-view. </p>
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder <p>Notice: These variables hold the URI/URL <em>as they were
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder initially requested</em>, <em>i.e.</em>, <em>before</em> any
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder rewriting. This is important because the rewriting process is
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder primarily used to rewrite logical URLs to physical
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder pathnames.</p>
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederSCRIPT_NAME=/sw/lib/w3s/tree/global/u/rse/.www/index.html
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederSCRIPT_URI=http://en1.engelschall.com/u/rse/
## map.txt -- rewriting map
Ralf.S.Engelschall rse # Bastard Operator From Hell
Mr.Joe.Average joe # Mr. Average
## map.txt -- rewriting map
# ...put here any transformations or lookups...
path. The default setting is; <directive>RewriteBase</directive> <em>physical-directory-path</em></p>
RewriteRule ^oldstuff\.html$ newstuff.html
RewriteRule ...some special stuff for any of these hosts...
RewriteRule ^/$ /homepage.max.html [L]
RewriteRule ^/$ /homepage.min.html [L]
RewriteRule ^/$ /homepage.std.html [L]
href="http://www.perldoc.com/perl5.6.1/pod/perlre.html">perldoc
'<strong><code>cookie|CO=</code></strong><em>NAME</em>:<em>VAL</em>:<em>domain</em>[:<em>lifetime</em>[:<em>path</em>]]'
^/somepath(.*) /otherpath$1 [R] http://thishost/otherpath/pathinfo
^/somepath(.*) http://thishost/otherpath$1 [P] not supported, because silly!
^localpath(.*) otherpath$1 [R] http://thishost/somepath/otherpath/pathinfo
^localpath(.*) /otherpath$1 [R] http://thishost/otherpath/pathinfo
^localpath(.*) http://thishost/otherpath$1 [P] not supported, because silly!