【发布时间】:2015-10-27 20:00:18
【问题描述】:
我在尝试从 url 中删除 index.php 时遇到很大问题
我已经搜索了很多论坛(这也是),但对我的情况没有帮助。
所以我有 config.php 文件
$config['base_url'] = '';
$config['index_page'] = '';
$config['uri_protocol'] = 'AUTO';
我的 .htaccess 文件在 index.php 附近的 public_html 文件夹中。
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
我打开了 rewrite_module(它正在工作)并且我的 httpd.conf AllowOverride 设置为 All
所以当我要去 mydomain.com/controller/action - 我得到 404 但是当我访问 mydomain.com/index.php/controller/action 时 - 一切正常..
我已经尝试了很多 .htaccess 示例......等等......没有任何帮助......
【问题讨论】:
-
问题已解决,因为此问题来自 python。我昨天卸载了它。现在在我的 PC 上安装 python 后它工作正常。我在 codeigniter 中的配置是正确的。感谢 4 位帮助。
标签: codeigniter