我希望可以http访问可以跳转到https上,同时去掉访问网站时出现的index.php
访问http://www.域名.com/index.php/1.html
可以直接跳转到 https://www.域名.com/1.html
实现方式:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php