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

Francis Daly francis at daoine.org
Fri Apr 17 07:14:20 UTC 2015


On Thu, Apr 16, 2015 at 10:13:33AM -0400, 173279834462 wrote:

Hi there,

> canonical:
> http://example.com/
> 
> unwanted variants:
> http://example.com/?mod=node&nid=some_thing&op=view
> http://example.com/?Open
> http://example.com/?OpenServer
> ...
> 
> Is there an nginx parameter to normalize this type of $uri?

When I request http://example.com/?Open, what response do you want to
send me?

Does

==
    location = / {
      if ($is_args) { return 301 /; }
    }
==

cause your right thing to happen?

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list