Welcome! Log In Create A New Profile

Advanced

redirect /it to /

Sandro Dentella
July 21, 2014 03:38AM
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
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

redirect /it to /

Sandro Dentella July 21, 2014 03:38AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 284
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready