Problem with Substitutions NginxHttpSubsModule

Weibin Yao nbubingo at
Thu Aug 12 05:57:33 MSD 2010

Martronic SA at 2010-8-11 23:45 wrote:
> I have a new question!
> Is it possible to disable the subsitution rules (subs_filter) under a 
> particular condition (if)
> I've tried to set those rules in a condition :
>  if ($http_cookie !~* "__ac") {
>     subs_filter_types text/html;
>     subs_filter;
> }
> The error is that it's not allowed to use this here.
No, this module is a filter module which can't be controlled by the 'if' 
But you can use the 'rewrite' directive to redirect the request to 
another location where you can use the substitutions module.
> Any idea or solution?
> Thank you
> Martronic SA
> Martial Moret

Weibin Yao

More information about the nginx mailing list