httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Krist van Besien" <>
Subject Re: [users@httpd] mod_rewrite + mod_proxy trouble
Date Mon, 11 Feb 2008 15:42:21 GMT
On Feb 11, 2008 3:25 PM, Travis Sidelinger <> wrote:

>    RewriteRule "^/(.*)$" proxy:balancer://aquabrowser$1&c_loc=220" [QSA,L]   # I
> get 404 Error: "GET //cd/README&c_loc=220%22?test=1 HTTP/1.1" in the logs of the
> backend server.

You append "&c_loc=220" to the URL, and then append the old query
string. The result is that your backend gets a request for the
resource "README&c_loc=220" with query string test=1, and the
resources is unavailable. Is this what you wanted? Or are you trying
to rewrite to Readme?c_loc=220&test=1 ?

Here is how you can use QSA:

Rewriterule   (/.*)                   /$1?newparam=value [QSA,L]

This will make apache merge the querystring you gave, with the
existing querystring. The above rule will add ?newparam=value if there
is no existing query string, and will add &newparam=value to an
existing query string. Furthermore you have to remember that a
Rewriterule operates only on the part to the left of the ?, a
rewriteruels cannot be uses to match against a query string, you can
do this however in a reWriteCond.

What would work for you would probably be something like:

 RewriteRule "^/(.*)$" proxy:balancer://aquabrowser$1?c_loc=220" [QSA,L]

This will never work:
  RewriteRule "^(.*\?.*)$" "{REQUEST_URI}&c_loc=220"

As reWriteRule operates on the URI without the query string.


Bremgarten b. Bern, Switzerland
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message