我已经完成了index.php
从URL删除的所有三个步骤,但是当我运行它时,它给了我这个错误:
找不到在此服务器上找不到请求的URL /ci_test/index.php。
我执行了以下3个步骤:
application / config / config.php
$config['index_page'] = '';
$config['uri_protocol'] = 'PATH_INFO';
添加.htaccess文件
在Apache服务器中启用了重写模式
.htaccess
通过我的以下工作将文件保存在根目录中。
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
和
$config['base_url'] = 'http://localhost/ci_test/';
$config['index_page'] = '';
$config['uri_protocol'] = 'REQUEST_URI';
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句