Reputation: 5354
I have this configuration inside server
block which redirects all http requests to the https server
with a 301, moved permanently
status.
The problem is that in Screaming Frog
or Chrome
I can see that http://kida.al
is redirected to https://kida.al// and then to https://kida.al/
.
How can I prevent such a thing?
Thanks!
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name kida.al;
return 301 https://$server_name$request_uri/;
}
Upvotes: 0
Views: 502
Reputation: 15110
You should remove the extra trailing slash from the end of your redirection path:
return 301 https://$server_name$request_uri;
Upvotes: 1