[feature] Add skip_location directive to ngx_http_rewrite
niq at apache.org
Thu Jan 17 11:32:55 UTC 2013
On 17 Jan 2013, at 10:07, Dmitrii Chekaliuk wrote:
> Hi guys,
> I'm new to nginx-devel, so, please, take my apologies in case this question was already discussed and rejected. Nginx is awesome, but I think it lacks the flexibility of configuration selection, e.g. it can't throw away the selected config on demand within the rewrite phase to select another one without a need to actually rewrite URI. Think of Apache mod_rewrite's RewriteCond+RewriteRule, it would be great to have the ability to write something like this:
I'm not sufficiently familiar with nginx config to comment on how it might work.
But with Apache we implemented <if "expr …"> to do (among other things)
exactly what you're asking for, in a saner manner than pseudo-programming
with mod_rewrite. Your suggestion looks like "IF foo GOTO bar", but wouldn't
you prefer IF/ELSE/ENDIF with a similar structure to a Location block?
More information about the nginx-devel