Welcome! Log In Create A New Profile

Advanced

Why should I have a 307 redirect ?

September 29, 2017 06:08PM
Hi there,

can somebody tell me why I have a 307 redirect response code
when I'm turning my redirect directive to https off ?

# curl -I https://www.avoirun.com
HTTP/1.1 200 OK
Server: nginx
Date: Fri, 29 Sep 2017 21:48:40 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
X-Pingback: https://www.avoirun.com/xmlrpc.php
Link: https://www.avoirun.com/; rel=shortlink

# curl -I http://www.avoirun.com
HTTP/1.1 307 Temporary Redirect
Server: nginx
Date: Fri, 29 Sep 2017 21:49:19 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
X-Pingback: http://www.avoirun.com/xmlrpc.php
Location: https://www.avoirun.com

# location = / {
# return 301 https://$host$request_uri;
# }

location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
#try_files $uri $uri/ =404;
try_files $uri $uri/ /index.php?$args;
#try_files $uri $uri/ /index.php;
root /usr/share/wordpress;
if ($http_user_agent ~ "MJ12bot|SemrushBot|Windows NT 5\.1\; rv:7\.0\.1") {
return 403;
}
}

Thanks for your help !

Ph. Gras
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Why should I have a 307 redirect ?

ph.gras September 29, 2017 06:08PM

RE: Why should I have a 307 redirect ?

Reinis Rozitis September 30, 2017 03:40AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 178
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