typecho虚拟主机开启伪静态.htaccess规则

如题,typecho伪静态.htaccess规则,

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>)

http跳转https的.htaccess规则

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]

# 不带 www 的跳转到https(删除这排)
RewriteCond %{HTTP_HOST} ^chuanhanzi.cn
RewriteRule (.*) https://chuanhanzi.cn/$1 [R=301,L]

# 带 www 的跳转到https的(删除这排)
RewriteCond %{HTTP_HOST} ^www.chuanhanzi.cn
RewriteRule (.*) https://img.chuanhanzi.cn/$1 [R=301,L]
</IfModule>
© 版权声明
THE END
喜欢就支持一下吧
点赞7 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容