我正在尝试使用www.hostname.com/crm/some/url将 CodeIgniter 框架中的 url 重定向到www.hostname.com/index.php?/some/url
我在我的 .htacess 中写了以下规则
RewriteEngine on
RewriteRule ^crm(.*)$ index.php?/$1 [L]
当我在浏览器中尝试此操作时,我从 codeIngnitor 获得页面未找到 404。但是,如果在重定向规则中添加 [R] 标志,它可以正常工作,并且我可以在更改后按预期看到新的 url。
我试过apache重写日志。一切看起来都很合适。我没有重写后 CodeIgniter 框架看到的 URL。任何帮助表示赞赏。