规则如下:
<IfModule mod_rewrite.c>
Options +FollowSymli
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
</IfModule>
我想把http协议改为https,证书什么的都弄好了,重定向的配置文件错了
Http 重定向到https
RewriteCond %{SERVER_PORT} !^443$
RewriteCond %{REQUEST_URI} !^/tz.PHP
RewriteRule (.*) https://%{SERVER_NAME}/$1 [R]
怎么把这两个合并呢? 我试着看了下rewriterule htaccess重定向语法,但是试了下不太灵光..
我改写成了
<IfModule mod_rewrite.c>
Options +FollowSymli
RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ https://%{SERVER_NAME}/index.php?/$1 [R,L]
</IfModule>
但是在跳转的时候 会产生BUG 一部分路径无法识别了。 大家有没有碰到过,求指教
最佳答案