我希望可以htpp访问可以跳转到https上,同时去掉访问网站时出现的index.php
访问http://www.域名.com/index.php/1.html可以直接跳转到 https://www.域名.com/1.html
RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://%{SERVER_NAME}/$1 [R]
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]
现在的伪静态是这样的,但是没办法跳转https
求大神指导。
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
跳转和伪静态是两码事
ps:另外请明确跳转的两端,然后设置vhost
伪静态才是rewrite干的事