]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
rewrite guide: remove terrible horrible crufty obsolete static-to-dynamic CGI and...
authorRich Bowen <rbowen@apache.org>
Fri, 1 May 2026 17:43:06 +0000 (17:43 +0000)
committerRich Bowen <rbowen@apache.org>
Fri, 1 May 2026 17:43:06 +0000 (17:43 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1933676 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/rewrite/remapping.xml

index 3038adec4878cd0caf7991efa289c365928d889f..8b03fcb322f3d19ae1d2061ee1663c06ffb32324 100644 (file)
@@ -165,40 +165,6 @@ Redirect "/docs/" "http://new.example.com/docs/"
 
 </section>
 
-<section id="static-to-dynamic">
-
-  <title>From Static to Dynamic</title>
-
-  <dl>
-    <dt>Description:</dt>
-
-    <dd>
-      <p>How can we transform a static page
-      <code>foo.html</code> into a dynamic variant
-      <code>foo.cgi</code> in a seamless way, i.e. without notice
-      by the browser/user.</p>
-    </dd>
-
-    <dt>Solution:</dt>
-
-    <dd>
-      <p>We just rewrite the URL to the CGI-script and force the
-      handler to be <strong>cgi-script</strong> so that it is
-      executed as a CGI program.
-      This way a request to <code>/~quux/foo.html</code>
-      internally leads to the invocation of
-      <code>/~quux/foo.cgi</code>.</p>
-
-<highlight language="config">
-RewriteEngine  on
-RewriteBase    "/~quux/"
-RewriteRule    "^foo\.html$"  "foo.cgi"  [H=<strong>cgi-script</strong>]
-</highlight>
-    </dd>
-  </dl>
-
-</section>
-
 <section id="backward-compatibility">
 
   <title>Backward Compatibility for file extension change</title>
@@ -396,63 +362,6 @@ RewriteRule "^"     "-"                                          [PT]
 
 </section>
 
-<section id="archive-access-multiplexer">
-
-  <title>Redirecting to Geographically Distributed Servers</title>
-
-  <dl>
-    <dt>Description:</dt>
-
-    <dd>
-    <p>We have numerous mirrors of our website, and want to redirect
-    people to the one that is located in the country where they are
-    located.</p>
-    </dd>
-
-    <dt>Solution:</dt>
-
-    <dd>
-    <p>Looking at the hostname of the requesting client, we determine
-    which country they are coming from. If we can't do a lookup on their
-    IP address, we fall back to a default server.</p>
-    <p>We'll use a <directive module="mod_rewrite">RewriteMap</directive>
-    directive to build a list of servers that we wish to use.</p>
-
-<highlight language="config">
-HostnameLookups on
-RewriteEngine on
-RewriteMap    multiplex         "txt:/path/to/map.mirrors"
-RewriteCond  "%{REMOTE_HOST}"   "([a-z]+)$"                [NC]
-RewriteRule  "^/(.*)$"          "${multiplex:<strong>%1</strong>|http://www.example.com/}$1"  [R,L]
-</highlight>
-
-<example>
-##  map.mirrors -- Multiplexing Map<br />
-<br />
-de        http://www.example.de/<br />
-uk        http://www.example.uk/<br />
-com       http://www.example.com/<br />
-##EOF##
-</example>
-    </dd>
-
-    <dt>Discussion</dt>
-    <dd>
-    <note type="warning">This ruleset relies on
-    <directive module="core">HostNameLookups</directive>
-    being set <code>on</code>, which can be
-    a significant performance hit.</note>
-
-    <p>The <directive module="mod_rewrite">RewriteCond</directive>
-    directive captures the last portion of the hostname of the
-    requesting client - the country code - and the following RewriteRule
-    uses that value to look up the appropriate mirror host in the map
-    file.</p>
-    </dd>
-  </dl>
-
-</section>
-
 <section id="canonicalurl">
 
 <title>Canonical URLs</title>