Htaccess File

dangger/dangger.github.io/master/.htaccess

HTTPS, REQUEST_FILENAME, SERVER_PORT
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
# 针对 Hostker 主机的 SSL 监听方案
RewriteCond %{HTTP:KERSSL} !on
# 全局 HTTPS 
RewriteCond %{SERVER_PORT} 80 
RewriteRule .* https://blog.dangge.moe/$1 [R=301,L]
</IfModule>
Exit mobile version