You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rb...@apache.org on 2026/05/01 17:43:13 UTC
svn commit: r1933677 - httpd/httpd/branches/2.4.x/docs/manual/rewrite
Author: rbowen
Date: Fri May 1 17:43:13 2026
New Revision: 1933677
Log:
rewrite guide: remove obsolete static-to-dynamic CGI and geo-redirect recipes (BZ 58892, step 7)
Modified:
httpd/httpd/branches/2.4.x/docs/manual/rewrite/remapping.xml
Modified: httpd/httpd/branches/2.4.x/docs/manual/rewrite/remapping.xml
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/rewrite/remapping.xml Fri May 1 17:43:06 2026 (r1933676)
+++ httpd/httpd/branches/2.4.x/docs/manual/rewrite/remapping.xml Fri May 1 17:43:13 2026 (r1933677)
@@ -165,40 +165,6 @@ Redirect "/docs/" "http://new.example.co
</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>
@@ -394,63 +360,6 @@ RewriteRule "^" "-"
</dd>
</dl>
-</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">