summaryrefslogtreecommitdiff
path: root/docs/manual/urlmapping.html.en
diff options
context:
space:
mode:
authorRich Bowen <rbowen@apache.org>2012-04-26 14:57:35 +0000
committerRich Bowen <rbowen@apache.org>2012-04-26 14:57:35 +0000
commit2e5d9d52e1b8e219329c84eea0313d14b7fd5a5c (patch)
tree6b77c732b713094f1d1c3dc7929fcec938777891 /docs/manual/urlmapping.html.en
parent74e009ce0a1fda0fd56efb8a573beeece725f810 (diff)
downloadhttpd-2e5d9d52e1b8e219329c84eea0313d14b7fd5a5c.tar.gz
Rebuild Humbedooh's changes.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1330892 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/manual/urlmapping.html.en')
-rw-r--r--docs/manual/urlmapping.html.en43
1 files changed, 28 insertions, 15 deletions
diff --git a/docs/manual/urlmapping.html.en b/docs/manual/urlmapping.html.en
index 569e8e13f0..528e70a442 100644
--- a/docs/manual/urlmapping.html.en
+++ b/docs/manual/urlmapping.html.en
@@ -94,7 +94,8 @@
<p>Alternatively, the <code class="directive"><a href="./mod/mod_alias.html#alias">Alias</a></code> directive will map any part
of the filesystem into the web space. For example, with</p>
-<div class="example"><p><code>Alias /docs /var/web</code></p></div>
+<pre class="prettyprint lang-config">Alias /docs /var/web</pre>
+
<p>the URL <code>http://www.example.com/docs/dir/file.html</code>
will be served from <code>/var/web/dir/file.html</code>. The
@@ -109,8 +110,10 @@
expression</a> based matching and substitution. For
example,</p>
-<div class="example"><p><code>ScriptAliasMatch ^/~([a-zA-Z0-9]+)/cgi-bin/(.+)
- /home/$1/cgi-bin/$2</code></p></div>
+ <pre class="prettyprint lang-config">
+ ScriptAliasMatch ^/~([a-zA-Z0-9]+)/cgi-bin/(.+) /home/$1/cgi-bin/$2
+ </pre>
+
<p>will map a request to
<code>http://example.com/~user/cgi-bin/script.cgi</code> to the
@@ -156,8 +159,10 @@
<code>/home/user/public_html/file.html</code>, use the following
<code>AliasMatch</code> directive:</p>
-<div class="example"><p><code>AliasMatch ^/upages/([a-zA-Z0-9]+)(/(.*))?$
- /home/$1/public_html/$3</code></p></div>
+ <pre class="prettyprint lang-config">
+ AliasMatch ^/upages/([a-zA-Z0-9]+)(/(.*))?$ /home/$1/public_html/$3
+ </pre>
+
</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
<div class="section">
<h2><a name="redirect" id="redirect">URL Redirection</a></h2>
@@ -174,8 +179,10 @@
to the new directory <code>/bar/</code>, you can instruct clients
to request the content at the new location as follows:</p>
-<div class="example"><p><code>Redirect permanent /foo/
- http://www.example.com/bar/</code></p></div>
+ <pre class="prettyprint lang-config">
+ Redirect permanent /foo/ http://www.example.com/bar/
+ </pre>
+
<p>This will redirect any URL-Path starting in
<code>/foo/</code> to the same URL path on the
@@ -188,14 +195,18 @@
for the site home page to a different site, but leave all other
requests alone, use the following configuration:</p>
-<div class="example"><p><code>RedirectMatch permanent ^/$
- http://www.example.com/startpage.html</code></p></div>
+ <pre class="prettyprint lang-config">
+ RedirectMatch permanent ^/$ http://www.example.com/startpage.html
+ </pre>
+
<p>Alternatively, to temporarily redirect all pages on one site
to a particular page on another site, use the following:</p>
-<div class="example"><p><code>RedirectMatch temp .*
- http://othersite.example.com/startpage.html</code></p></div>
+ <pre class="prettyprint lang-config">
+ RedirectMatch temp .* http://othersite.example.com/startpage.html
+ </pre>
+
</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
<div class="section">
<h2><a name="proxy" id="proxy">Reverse Proxy</a></h2>
@@ -213,12 +224,13 @@ the <code>/bar/</code> directory on <code>internal.example.com</code>
and returns them to the client as if they were from the local
server.</p>
-<div class="example"><p><code>
+<pre class="prettyprint lang-config">
ProxyPass /foo/ http://internal.example.com/bar/<br />
ProxyPassReverse /foo/ http://internal.example.com/bar/<br />
ProxyPassReverseCookieDomain internal.example.com public.example.com<br />
ProxyPassReverseCookiePath /foo/ /bar/
-</code></p></div>
+</pre>
+
<p>The <code class="directive"><a href="./mod/mod_proxy.html#proxypass">ProxyPass</a></code> configures
the server to fetch the appropriate documents, while the
@@ -237,9 +249,10 @@ breaking out of the proxy server and requesting directly from
content) in a page as it is being served to the client using
<code class="module"><a href="./mod/mod_substitute.html">mod_substitute</a></code>.</p>
-<div class="example"><p><code>
+<pre class="prettyprint lang-config">
Substitute s/internal\.example\.com/www.example.com/i
-</code></p></div>
+</pre>
+
<p>For more sophisticated rewriting of links in HTML and XHTML, the
<code class="module"><a href="./mod/mod_proxy_html.html">mod_proxy_html</a></code> module is also available. It allows you