]> granicus.if.org Git - apache/commitdiff
Continue with addressing the FAQ: How to do url manipulation
authorJoshua Slive <slive@apache.org>
Thu, 12 Aug 2004 15:50:57 +0000 (15:50 +0000)
committerJoshua Slive <slive@apache.org>
Thu, 12 Aug 2004 15:50:57 +0000 (15:50 +0000)
on the query string.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104636 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/mod_rewrite.html.en
docs/manual/mod/mod_rewrite.xml

index fd1e66f9167f63d17e068143b1de49af6fdeba40..8c8cfa04ef46ff1e04adae7889a55329107119dd 100644 (file)
@@ -1350,16 +1350,21 @@ When using the NOT character
       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
@@ -1367,15 +1372,13 @@ There is a special feature:
           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
index da8421d1063bbd0c3e9c5841b6c6e32078a6af49..fe4230ce370e37c562375e1e79ec2a89ed96ad1a 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
-<!-- $Revision: 1.27 $ -->
+<!-- $Revision: 1.28 $ -->
 
 <!--
  Copyright 2002-2004 The Apache Software Foundation
@@ -1368,16 +1368,22 @@ When using the NOT character
       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
@@ -1385,15 +1391,13 @@ There is a special feature:
           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