伪静态并强制跳转https.

2023-07-12 · ♪ 527
伪静态并强制跳转https.

问就是垃圾主机要自己设置,备份一下。

    <IfModule mod_rewrite.c>
    RewriteEngine On
    #伪静态
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php/$1 [L,E=PATH_INFO:$1]
    #强制跳转https
    RewriteCond %{HTTPS} !=on
    RewriteRule ^(.*) https://hyde.live/$1 [L,R=301]
    </IfModule>

重命名.htaccess,丢进根目录,over~

伪静态
Theme Jasmine by Kent Liao 皖ICP备2022001739号-1