httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Bray" <nood...@gmail.com>
Subject Re: [users@httpd] rewrite then reverse proxy
Date Sat, 22 Jul 2006 16:32:06 GMT
On 7/22/06, Neo Wee Teck <stelgn@gmail.com> wrote:
> Wonder can this be done....
It can!
> Apache does a rewrite based on a rule, then reverse proxy to the
> actual destination
>
> eg.
>
> Rewrite
> ----------
>
> Request to http://foo.com/news/3843.html
>
> [Some rewrite rules]
> Actual request  -> http://foo.com/news.php?3843
>
> Reverse Proxy
> ---------------------
>
> ProxyPass / http://backend/
>
> Final request -> http://backend/news.php?3843

You need the [P] flag for RewriteRule. Something like,

RewriteRule ^/news/(\d+)\.html http://backend/news.php?$1 [P]
ProxyPassReverse / http://backend/

-- 
noodl

---------------------------------------------------------------------
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