httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <jos...@slive.ca>
Subject Re: [users@httpd] rewrite proxy and query string
Date Thu, 05 Oct 2006 19:00:00 GMT
On 10/5/06, David Salisbury <salisbury@globe.gov> wrote:
>
> Just wondering if this is possible.
>
> Due to a technicality, I would like urls on our site asking for
>
> /dir/prog?gl/clouds.men*
> to be reverse proxied from
> http://another.domain.com/dir/prog?gl/clouds.men*
>
> So I'm trying.
>
> RewriteEngine on
> RewriteRule ^(/dir/prog?gl/clouds.men*) http://another.domain.com/$1 [p]
>
> Doesn't seem to work though by itself.

In the docs for RewriteRule, see the big box labeled "Query String".
You need something like:

RewriteEngine On
RewriteCond %{QUERY_STRING} ^gl/clouds.men
RewriteRule ^/dir/prog http://another.domain.com/dir/prog [P]

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message