弄了很久,以下是同时支持地址重写和https的 .htaccess 设置 ↓

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /index.php/$1 [L]
# RewriteCond %{HTTP_HOST} ^poi.tech 
# RewriteRule (.*) http://poi.tech/$1 [R,L]
RewriteCond %{HTTPS} !^on$ 
RewriteRule (.*) https://%{SERVER_NAME}%{REQUEST_URI} [R] 
</IfModule>  

标签: none

添加新评论