From a88c9085d059aa6c29944019e69bf88724e0eceb Mon Sep 17 00:00:00 2001 From: Joshua Slive Date: Thu, 12 Aug 2004 15:50:57 +0000 Subject: [PATCH] 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/trunk@104636 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/mod/mod_rewrite.html.en | 31 ++++++++++++++------------ docs/manual/mod/mod_rewrite.xml | 34 ++++++++++++++++------------- 2 files changed, 36 insertions(+), 29 deletions(-) diff --git a/docs/manual/mod/mod_rewrite.html.en b/docs/manual/mod/mod_rewrite.html.en index fd1e66f916..8c8cfa04ef 100644 --- a/docs/manual/mod/mod_rewrite.html.en +++ b/docs/manual/mod/mod_rewrite.html.en @@ -1350,16 +1350,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 @@ -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. -

+ 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 diff --git a/docs/manual/mod/mod_rewrite.xml b/docs/manual/mod/mod_rewrite.xml index da8421d106..fe4230ce37 100644 --- a/docs/manual/mod/mod_rewrite.xml +++ b/docs/manual/mod/mod_rewrite.xml @@ -1,7 +1,7 @@ - +