菜单

http到https的301重定向

2018年3月7日 - 重要

RewriteEngine On
RewriteCond %{http_host} ^opgw.net$ [NC]
RewriteRule ^(.*)$ https://www.opgw.net/$1 [R=301,L]
RewriteCond % !^$
RewriteRule uploads/(.*).(php)$ – [F]
RewriteRule data/(.*).(php)$ – [F]
RewriteRule templets/(.*).(php)$ – [F]
RewriteCond %{SERVER_PORT} !^443$
RewriteCond %{http_host} www.opgw.net$
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]