Re: Rewrite with proxy adds document root

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

 



On Mon, Sep 24, 2018 at 11:46 AM David Tkacik
<dtkacik@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> Thanks Eric,
>
> But if I have multiple rewrite rules and rewrite conditions, how do I speficy for which cond and rule I want to apply it in context of a URI ?
>
> Would waterfall work here ?
>
> For example in one config:
>
> RewriteCond %{QUERY_STRING} ^123 [NC]
> RequestHeader set "X-API-KEY" "proxied"
> RewriteRule ^/123/(.*) "https://${HOST}$1"; [QSD,P,L]
>
> RewriteCond %{QUERY_STRING} ^456 [NC]
> RequestHeader set "X-API-KEY” “different-api-key"
> RewriteRule ^/456/(.*) "https://${HOST}$1"; [QSD,P,L]
>
> Thanks !

The conditions are automatically only applied to the RewriteRule that
they precede. And the RewriteRule can already match against  the URI.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-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