模式重写对一个地址无效


Mode Rewrite is not working for one address

我在htaccess文件中添加了一些规则,以便从Code Igniter中的url中删除index.php。然而,对于仅一个地址,它不起作用

url是这样的"http://example.com/subtitle/eveythingelse/";

因此,当第二个uri是"subtitle"或"sub"时,它不会发送到"index.php",而是直接读取不存在的文件夹。

如果我更改第二个uri"http://example.com/changed/everythingelse"它有效。

我真的很困惑。

这是.htacce:的代码

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]

这是因为使用final/

RewriteCond %{REQUEST_FILENAME} !-d

测试目录是否存在,不要重写。您可以删除此条件。