You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by sl...@apache.org on 2004/08/12 17:54:20 UTC

cvs commit: httpd-2.0/docs/manual/mod mod_rewrite.xml mod_rewrite.html.en

slive       2004/08/12 08:54:20

  Modified:    docs/manual/mod Tag: APACHE_2_0_BRANCH mod_rewrite.xml
                        mod_rewrite.html.en
  Log:
  Backport:
    Continue with addressing the FAQ: How to do url manipulation
    on the query string.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.11.2.10 +19 -15    httpd-2.0/docs/manual/mod/mod_rewrite.xml
  
  Index: mod_rewrite.xml
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/docs/manual/mod/mod_rewrite.xml,v
  retrieving revision 1.11.2.9
  retrieving revision 1.11.2.10
  diff -u -d -u -r1.11.2.9 -r1.11.2.10
  --- mod_rewrite.xml	17 Apr 2004 18:43:37 -0000	1.11.2.9
  +++ mod_rewrite.xml	12 Aug 2004 15:54:19 -0000	1.11.2.10
  @@ -1343,16 +1343,22 @@
         able to have more than one pattern to be applied before a
         substitution occurs.</p>
   
  -      <p>One more note: You can even create URLs in the
  -      substitution string containing a query string part. Just use
  -      a question mark inside the substitution string to indicate
  -      that the following stuff should be re-injected into the
  -      QUERY_STRING. When you want to erase an existing query
  -      string, end the substitution string with just the question
  -      mark.</p>
  +<note><title>Query String</title>
  +      <p>The <em>Pattern</em> will not match against the query string.
  +      Instead, you must use a <directive
  +      module="mod_rewrite">RewriteCond</directive> with the
  +      <code>%{QUERY_STRING}</code> variable.  You can, however, create
  +      URLs in the substitution string containing a query string
  +      part. Just use a question mark inside the substitution string to
  +      indicate that the following stuff should be re-injected into the
  +      query string. When you want to erase an existing query string,
  +      end the substitution string with just the question mark.  To
  +      combine a new query string with an old one, use the
  +      <code>[QSA]</code> flag (see below).</p>
  +</note>
   
  -<note><title>Note</title>
  -There is a special feature:
  +<note><title>Substitution of Absolute URLs</title>
  +          <p>There is a special feature:
             When you prefix a substitution field with
             <code>http://</code><em>thishost</em>[<em>:thisport</em>]
             then <strong>mod_rewrite</strong> automatically strips it
  @@ -1360,15 +1366,13 @@
             URLs is a useful and important feature when used in
             combination with a mapping-function which generates the
             hostname part. Have a look at the first example in the
  -          example section below to understand this.
  -</note>
  +          example section below to understand this.</p>
   
  -<note><title>Remember</title>
  - An unconditional external
  +          <p><strong>Remember:</strong> An unconditional external
             redirect to your own server will not work with the prefix
             <code>http://thishost</code> because of this feature. To
             achieve such a self-redirect, you have to use the
  -          <strong>R</strong>-flag (see below).
  +          <strong>R</strong>-flag (see below).</p>
   </note>
   
         <p>Additionally you can set special flags for
  
  
  
  1.16.2.9  +18 -15    httpd-2.0/docs/manual/mod/mod_rewrite.html.en
  
  Index: mod_rewrite.html.en
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/docs/manual/mod/mod_rewrite.html.en,v
  retrieving revision 1.16.2.8
  retrieving revision 1.16.2.9
  diff -u -d -u -r1.16.2.8 -r1.16.2.9
  --- mod_rewrite.html.en	3 Apr 2004 16:30:45 -0000	1.16.2.8
  +++ mod_rewrite.html.en	12 Aug 2004 15:54:19 -0000	1.16.2.9
  @@ -1325,16 +1325,21 @@
         able to have more than one pattern to be applied before a
         substitution occurs.</p>
   
  -      <p>One more note: You can even create URLs in the
  -      substitution string containing a query string part. Just use
  -      a question mark inside the substitution string to indicate
  -      that the following stuff should be re-injected into the
  -      QUERY_STRING. When you want to erase an existing query
  -      string, end the substitution string with just the question
  -      mark.</p>
  +<div class="note"><h3>Query String</h3>
  +      <p>The <em>Pattern</em> will not match against the query string.
  +      Instead, you must use a <code class="directive"><a href="#rewritecond">RewriteCond</a></code> with the
  +      <code>%{QUERY_STRING}</code> variable.  You can, however, create
  +      URLs in the substitution string containing a query string
  +      part. Just use a question mark inside the substitution string to
  +      indicate that the following stuff should be re-injected into the
  +      query string. When you want to erase an existing query string,
  +      end the substitution string with just the question mark.  To
  +      combine a new query string with an old one, use the
  +      <code>[QSA]</code> flag (see below).</p>
  +</div>
   
  -<div class="note"><h3>Note</h3>
  -There is a special feature:
  +<div class="note"><h3>Substitution of Absolute URLs</h3>
  +          <p>There is a special feature:
             When you prefix a substitution field with
             <code>http://</code><em>thishost</em>[<em>:thisport</em>]
             then <strong>mod_rewrite</strong> automatically strips it
  @@ -1342,15 +1347,13 @@
             URLs is a useful and important feature when used in
             combination with a mapping-function which generates the
             hostname part. Have a look at the first example in the
  -          example section below to understand this.
  -</div>
  +          example section below to understand this.</p>
   
  -<div class="note"><h3>Remember</h3>
  - An unconditional external
  +          <p><strong>Remember:</strong> An unconditional external
             redirect to your own server will not work with the prefix
             <code>http://thishost</code> because of this feature. To
             achieve such a self-redirect, you have to use the
  -          <strong>R</strong>-flag (see below).
  +          <strong>R</strong>-flag (see below).</p>
   </div>
   
         <p>Additionally you can set special flags for
  @@ -1759,4 +1762,4 @@
   </div><div id="footer">
   <p class="apache">Copyright 1999-2004 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
   <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div>
  -</body></html>
  \ No newline at end of file
  +</body></html>