.htaccess伪静态重定向
如果需要将域名从gworg.com跳转到www.gworg.com,则可以使用一下代码:
RewriteEngine onRewriteCond %{http_host} ^gworg.com [NC]
RewriteRule ^(.*)$https://www.gworg.com/$1[L,R=301]
强制HTTPS
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R,L]
Apache自动跳转到 HTTPS:https://www.gworg.com/ssl/130.html