阿里云虚拟主机 zblog 多目录 http 301重定向到 https

百晓生2025-04-08 11:23:59183

RewriteEngine On


RewriteCond %{SERVER_PORT} !^443$

RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R=301]


RewriteBase /blog/

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /blog/index.php [L]


RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]


注意:站内301重定向 需要写在头部,站内目录,也需要写在头部,比如:/blog/


本文链接:http://www.58q.org/b/9.html 转载需授权!

扫一扫二维码,添加客服微信