httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <>
Subject Re: [users@httpd] [P] flag in mod_rewrite
Date Thu, 11 Aug 2005 19:38:10 GMT
On 8/11/05, Anthony Browne <> wrote:
>         The reason I need to proxy with mod_proxy after a rewrite is
> because I need to check and see if the request can be satisfied from
> our static cache of mirrored sites using mod_rewrite's -s and -d
> flags. If the request cannot be satisfied from the filesystem, the
> request must be rewritten again back to normal and proxied to the
> remote host. We want it to appear to the user as though they are
> receiving the request from the actual server and to have it
> reflect as much in the users address bar.
>         This works for most requests that require an actual proxy, but
> it does not work for those sites requiring basic, NTLM, or https
> authentication. We're not concerned with https because our server
> won't support it, but we do need basic and NTLM to work. When using
> ProxyRequests on, this works with all three forms of authentication,
> but the rewrite rules are skipped.
>         The ideal situation would be to rewrite and use ProxyRequests
> on in the event of an actual proxy, rather than with the [P] flag.
> It appears that the [P] flag only has limited access to mod_proxy's
> functionality.
>         So, this is why we need to do this. Our server is complicated
> and pretty unconventional. I can elaborate further about the goal
> and intent of our server if necessary.

Ah.  So your problem is that you are trying to do a forward proxy,
whereas the [P] flag of mod_rewrite creates a reverse proxy (like the
ProxyPass directive).  I've never played much with forward proxies, so
I can't really help you here.  I don't know whether or not it is
possible to manipulate forward proxy requests with mod_rewrite.  I'd
tend to doubt it.  One idea would be to look at mod_cache and
mod_disk_cache rather than trying to role your own cache with


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