redirect /it to /

Sandro Dentella sandro.dentella at
Mon Jul 21 07:36:02 UTC 2014


I need to hide /it Query portion for SEO request in a django-cms setup.

I tryed with::

    location /it {
      if ($request_method = 'GET') {
        rewrite ^/it(/?.*)$1 ;
    location / {
        uwsgi_pass  preprod;
        include /etc/nginx/proxy.conf;
        include /etc/nginx/uwsgi_params;

everything works corectly BUT authentication (that is a POST to
/it/). My impression is that 'location /it' doesn't handle a POST and it
doesn't fall back to the more general 'location /'. Is it correct?
What it the std way to achieve a redirect just in case of a GET request?

Thanks in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list