Stripping out query parameter?

Neil Sheth nsheth at
Tue Mar 3 11:08:11 MSK 2009


I'm trying to rewrite some urls that are incorrect.  An example would be:

I want to rewrite this to

I'm trying something like the following, without luck:

         if ($args ~* ^(.*)(&?)extra=yes$) {
             set $stripped_params = $1;
             rewrite ^(.*)$ $1$stripped_params permanent;

Any thoughts?  I'm running 0.6.31.  Thanks!

More information about the nginx mailing list