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

Re: [users@httpd] Rewrite with proxy adds document root

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