Home  >  Q&A  >  body text

nginx - https redirection problem?

Problem background:

 无论是输入http://...,还是输入域名,都能跳转至https://...,
 

Question: There are many ways, some are written in the file that configures port 80, some are written in .htaccess, and some set meta/refresh on the page.
Which one is more cost-effective?

PHPzPHPz2701 days ago806

reply all(3)I'll reply

  • 迷茫

    迷茫2017-05-27 17:47:00

    It is recommended to write port 80
    1. No need for meta and refresh

    reply
    0
  • PHP中文网

    PHP中文网2017-05-27 17:47:00

    Port 80, make a jump

    reply
    0
  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-05-27 17:47:00

    The most cost-effective method is to use nginx’s rewrite to configure it

    reply
    0
  • Cancelreply