canonicalization of $uri with "/?.*" content

Francis Daly francis at daoine.org
Sat Apr 18 08:27:27 UTC 2015


On Fri, Apr 17, 2015 at 09:10:34AM -0400, 173279834462 wrote:

Hi there,

> 301 to /:  this would do the canonicalization,
> > location = / { if ($is_args) { return 301 /; }  }
> 
> 404: this would correspond to reality, 
> > location = / { if ($is_args) { return 404; }  }
> 
> However, if one compiled nginx without the scripting engines, shouldn't it
> return 404 by default, 
> instead of returning 200 while ignoring $uri's content?

I'd say "no".

If you want your instance to care more about $query_string than the
default, you can configure it to, for example as above.

Cheers,

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list