2
嘿,我使用codeigniter和添加重写规则从url中删除index.php
工作正常。htaccess重定向到https与index.php
但是,我已经添加了一个规则来重定向所有http请求到https,但是当它做到它重定向与index.php。
含义,如果我进入这个网址:domain.com/somecoolcontroler
它将我重定向到:https://domain.com/index.php/somecoolcontroler
但事后导航,当谈到恢复正常的网址没有,所以我想这个问题是在重定向规则,这是我把它放在htaccess中:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
我该如何解决这个问题?
谢谢乔恩,你说得对,这解决了我的问题。 –