Re: [users@httpd] [P] flag in mod_rewrite

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/10/05, Anthony Browne <aabrowne@xxxxxxxxxxxx> wrote:
>             What does the [P] flag in mod_rewrite use to proxy requests? For
> example, the only way to rewrite a request and proxy it is with the [P] flag
> after the rewrite. I haven't been able to find a way to proxy requests after
> a rewrite with mod_rewrite without using the [P] flag. Apache seems to apply
> rules from mod_proxy before rules from mod_rewrite and, if a mod_proxy rule
> applies, the mod_rewrite rules are skipped. Why is this the case and is
> there a way around this? 

There is no way around this that I know of besides manually messing
with module ordering, which is not usually a good idea.

But the real question is: why would you need to do this?  If you are
already processing a request with mod_rewrite then it is usually much
clearer if you use mod_rewrite to ask for the proxying as well. 
mod_rewrite doesn't actually do the proxying, but simply handes it
back to mod_proxy.  So, for example, the following two directives are
essentially identical in effect (except perhaps in very special
cases):

ProxyPass /foo http://bar
RewriteRule ^/foo(.*) http://bar$1 [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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux