redirect /it to /

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


Hi,

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(/?.*) https://my.domain.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
sandro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20140721/77a6d4fb/attachment.html>


More information about the nginx mailing list