N
N
Nikita Mikhailov2017-07-06 11:42:34
htaccess
Nikita Mikhailov, 2017-07-06 11:42:34

How to remove site port from server response?

Good afternoon. There was such a problem:
The site has a redirect from http to https in the htaccess file (everything is as usual):

RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]


Everything works fine, but in the server response (checked with the mainspy service), the redirect from http looks like this (left only the necessary one):

HTTP/1.1 301 Moved Permanently
Server: nginx/1.10.2
Location: https:// mysite. en:443/

And here's the question: what should be done to remove the port from the location?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikita Mikhailov, 2017-07-06
@Psixodelik

For some reason, the developers in nginx made a redirect with the port when connecting to port 80. Problem solved :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question