【发布时间】:2016-05-14 22:44:40
【问题描述】:
我知道这个问题已经被问过很多次了。 但是,我仍然无法摆脱 index.php 网址。它阻止我直接访问我的控制器。
我目前正在使用CodeIgniter 2.2.2。
以下是我的.htaccess 文件:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
应用程序/配置:
// Find the below code
$config['uri_protocol'] = "AUTO"
// Replace it as
$config['uri_protocol'] = "REQUEST_URI"
有什么想法吗?提前感谢您的宝贵时间。
【问题讨论】:
-
你使用的是 wamp 还是 xampp?
-
我现在正在使用 wamp,但目前我也希望能够在生产环境中访问。 (产品当前正在运行 linux apache)
标签: php .htaccess codeigniter config