From: Joshua Slive Date: Thu, 12 Aug 2004 15:54:19 +0000 (+0000) Subject: Backport: X-Git-Tag: STRIKER_2_0_51_RC1^2~90 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4474dad27199f253819546f1326a8e71cbb26659;p=thirdparty%2Fapache%2Fhttpd.git Backport: Continue with addressing the FAQ: How to do url manipulation on the query string. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@104637 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/mod_rewrite.html.en b/docs/manual/mod/mod_rewrite.html.en index 9634f749b95..d156e3f40ea 100644 --- a/docs/manual/mod/mod_rewrite.html.en +++ b/docs/manual/mod/mod_rewrite.html.en @@ -1325,16 +1325,21 @@ When using the NOT character able to have more than one pattern to be applied before a substitution occurs.

-

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.

+

Query String

+

The Pattern will not match against the query string. + Instead, you must use a RewriteCond with the + %{QUERY_STRING} 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 + [QSA] flag (see below).

+
-

Note

-There is a special feature: +

Substitution of Absolute URLs

+

There is a special feature: When you prefix a substitution field with http://thishost[:thisport] then mod_rewrite automatically strips it @@ -1342,15 +1347,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. -

+ example section below to understand this.

-

Remember

- An unconditional external +

Remember: An unconditional external redirect to your own server will not work with the prefix http://thishost because of this feature. To achieve such a self-redirect, you have to use the - R-flag (see below). + R-flag (see below).

Additionally you can set special flags for @@ -1759,4 +1762,4 @@ RewriteRule ^/([^/]+)/~([^/]+)/(.*)$ /u/${real-to-user:$2|nobody}/$3.$1

- \ No newline at end of file + diff --git a/docs/manual/mod/mod_rewrite.xml b/docs/manual/mod/mod_rewrite.xml index f8ead1181ee..2e99a59e21f 100644 --- a/docs/manual/mod/mod_rewrite.xml +++ b/docs/manual/mod/mod_rewrite.xml @@ -1,7 +1,7 @@ - +