Forcing SSL and WWW using .htaccess

前端 未结 7 805
野性不改
野性不改 2020-12-13 00:59

I would like to know if this code in .htaccess for forcing SSL and WWW in URL is correct, because with another codes I usually get redirect loop, e.g. Rew

相关标签:
7条回答
  • 2020-12-13 01:14

    9 Force www: is perfect thank you.

    My server is Heart Internet and the force SSL for Heart is:

    # All calls go to SSL
    RewriteEngine On
    RewriteCond %{ENV:HTTPS} !=on
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
    
    0 讨论(0)
提交回复
热议问题