You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by po...@apache.org on 2009/12/14 19:52:20 UTC
svn commit: r890437 - in /httpd/httpd/trunk/docs/manual: glossary.html.en
mod/core.xml.de mod/core.xml.ja mod/core.xml.tr mod/mod_alias.html.en
Author: poirier
Date: Mon Dec 14 18:52:03 2009
New Revision: 890437
URL: http://svn.apache.org/viewvc?rev=890437&view=rev
Log:
Update transforms.
Modified:
httpd/httpd/trunk/docs/manual/glossary.html.en
httpd/httpd/trunk/docs/manual/mod/core.xml.de
httpd/httpd/trunk/docs/manual/mod/core.xml.ja
httpd/httpd/trunk/docs/manual/mod/core.xml.tr
httpd/httpd/trunk/docs/manual/mod/mod_alias.html.en
Modified: httpd/httpd/trunk/docs/manual/glossary.html.en
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/glossary.html.en?rev=890437&r1=890436&r2=890437&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/glossary.html.en (original)
+++ httpd/httpd/trunk/docs/manual/glossary.html.en Mon Dec 14 18:52:03 2009
@@ -363,7 +363,9 @@
attributes against collections of files or resources in very flexible ways
- for example, all .gif and .jpg files under any "images" directory could
be written as "<code>/images/.*(jpg|gif)$</code>". Apache uses Perl
- Compatible Regular Expressions provided by the <a href="http://www.pcre.org/">PCRE</a> library.
+ Compatible Regular Expressions provided by the <a href="http://www.pcre.org/">PCRE</a> library. You can find more documentation
+ about PCRE's regular expression syntax at that site, or at
+ <a href="http://en.wikipedia.org/wiki/PCRE">Wikipedia</a>.
</dd>
<dt><a name="reverseproxy" id="reverseproxy">Reverse Proxy</a></dt>
Modified: httpd/httpd/trunk/docs/manual/mod/core.xml.de
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/core.xml.de?rev=890437&r1=890436&r2=890437&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/core.xml.de (original)
+++ httpd/httpd/trunk/docs/manual/mod/core.xml.de Mon Dec 14 18:52:03 2009
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.de.xsl"?>
-<!-- English Revision: 167959:886154 (outdated) -->
+<!-- English Revision: 167959:890378 (outdated) -->
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
Modified: httpd/httpd/trunk/docs/manual/mod/core.xml.ja
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/core.xml.ja?rev=890437&r1=890436&r2=890437&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/core.xml.ja [utf-8] (original)
+++ httpd/httpd/trunk/docs/manual/mod/core.xml.ja [utf-8] Mon Dec 14 18:52:03 2009
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.ja.xsl"?>
-<!-- English Revision: 669847:886154 (outdated) -->
+<!-- English Revision: 669847:890378 (outdated) -->
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
Modified: httpd/httpd/trunk/docs/manual/mod/core.xml.tr
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/core.xml.tr?rev=890437&r1=890436&r2=890437&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/core.xml.tr [utf-8] (original)
+++ httpd/httpd/trunk/docs/manual/mod/core.xml.tr [utf-8] Mon Dec 14 18:52:03 2009
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.tr.xsl"?>
-<!-- English Revision: 813376:886154 (outdated) -->
+<!-- English Revision: 813376:890378 (outdated) -->
<!-- =====================================================
Translated by: Nilgün Belma Bugüner <nilgun belgeler.org>
Reviewed by: Orhan Berent <berent belgeler.org>
Modified: httpd/httpd/trunk/docs/manual/mod/mod_alias.html.en
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mod_alias.html.en?rev=890437&r1=890436&r2=890437&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/mod_alias.html.en (original)
+++ httpd/httpd/trunk/docs/manual/mod/mod_alias.html.en Mon Dec 14 18:52:03 2009
@@ -190,13 +190,65 @@
AliasMatch ^/icons(.*) /usr/local/apache/icons$1
</code></p></div>
- <p>It is also possible to construct an alias with case-insensitive
+ <p>The full range of <a class="glossarylink" href="../glossary.html#regex" title="see glossary">regular expression</a>
+ power is available. For example,
+ it is possible to construct an alias with case-insensitive
matching of the url-path:</p>
<div class="example"><p><code>
AliasMatch (?i)^/image(.*) /ftp/pub/image$1
</code></p></div>
+ <p>One subtle difference
+ between <code class="directive"><a href="#alias">Alias</a></code>
+ and <code class="directive"><a href="#aliasmatch">AliasMatch</a></code> is
+ that <code class="directive"><a href="#alias">Alias</a></code> will
+ automatically copy any additional part of the URI, past the part
+ that matched, onto the end of the file path on the right side,
+ while <code class="directive"><a href="#aliasmatch">AliasMatch</a></code> will
+ not. This means that in almost all cases, you will want the
+ regular expression to match the entire request URI from beginning
+ to end, and to use substitution on the right side.</p>
+
+ <p>In other words, just changing
+ <code class="directive"><a href="#alias">Alias</a></code> to
+ <code class="directive"><a href="#aliasmatch">AliasMatch</a></code> will not
+ have the same effect. At a minimum, you need to
+ add <code>^</code> to the beginning of the regular expression
+ and add <code>(.*)$</code> to the end, and add <code>$1</code> to
+ the end of the replacement.</p>
+
+ <p>For example, suppose you want to replace this with AliasMatch:</p>
+
+ <div class="example"><p><code>
+ Alias /image/ /ftp/pub/image/
+ </code></p></div>
+
+ <p>This is NOT equivalent - don't do this! This will send all
+ requests that have /image/ anywhere in them to /ftp/pub/image/:</p>
+
+ <div class="example"><p><code>
+ AliasMatch /image/ /ftp/pub/image/
+ </code></p></div>
+
+ <p>This is what you need to get the same effect:</p>
+
+ <div class="example"><p><code>
+ AliasMatch ^/image/(.*)$ /ftp/pub/image/$1
+ </code></p></div>
+
+ <p>Of course, there's no point in
+ using <code class="directive"><a href="#aliasmatch">AliasMatch</a></code>
+ where <code class="directive"><a href="#alias">Alias</a></code> would
+ work. <code class="directive"><a href="#aliasmatch">AliasMatch</a></code> lets
+ you do more complicated things. For example, you could
+ serve different kinds of files from different directories:</p>
+
+ <div class="example"><p><code>
+ AliasMatch ^/image/(.*)\.jpg$ /files/jpg.images/$1.jpg<br />
+ AliasMatch ^/image/(.*)\.gif$ /files/gif.images/$1.gif
+ </code></p></div>
+
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
@@ -316,6 +368,17 @@
RedirectMatch (.*)\.gif$ http://www.anotherserver.com$1.jpg
</code></p></div>
+ <p>The considerations related to the difference between
+ <code class="directive"><a href="#alias">Alias</a></code> and
+ <code class="directive"><a href="#aliasmatch">AliasMatch</a></code>
+ also apply to the difference between
+ <code class="directive"><a href="#redirect">Redirect</a></code> and
+ <code class="directive"><a href="#redirectmatch">RedirectMatch</a></code>.
+ See <code class="directive"><a href="#aliasmatch">AliasMatch</a></code> for
+ details.</p>
+
+
+
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="RedirectPermanent" id="RedirectPermanent">RedirectPermanent</a> <a name="redirectpermanent" id="redirectpermanent">Directive</a></h2>
@@ -450,6 +513,25 @@
ScriptAliasMatch ^/cgi-bin(.*) /usr/local/apache/cgi-bin$1
</code></p></div>
+ <p>As for AliasMatch, the full range of <a class="glossarylink" href="../glossary.html#rexex" title="see glossary">regular
+ expression</a> power is available.
+ For example, it is possible to construct an alias with case-insensitive
+ matching of the url-path:</p>
+
+ <div class="example"><p><code>
+ ScriptAliasMatch (?i)^/cgi-bin(.*) /usr/local/apache/cgi-bin$1
+ </code></p></div>
+
+ <p>The considerations related to the difference between
+ <code class="directive"><a href="#alias">Alias</a></code> and
+ <code class="directive"><a href="#aliasmatch">AliasMatch</a></code>
+ also apply to the difference between
+ <code class="directive"><a href="#scriptalias">ScriptAlias</a></code> and
+ <code class="directive"><a href="#scriptaliasmatch">ScriptAliasMatch</a></code>.
+ See <code class="directive"><a href="#aliasmatch">AliasMatch</a></code> for
+ details.</p>
+
+
</div>
</div>
<div class="bottomlang">