【发布时间】:2016-06-21 21:10:42
【问题描述】:
希望有人能帮我解决这个错误,我的项目 HMVC CodeIgniter 3.0 中有以下代码行
config.php
$config['base_url'] = 'http://web.com/project/';
$config['index_page'] = 'index.php';
$config['uri_protocol'] = 'REQUEST_URI';
routes.php
$route['default_controller'] = 'login/home';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;
.htaccess
RewriteEngine on
RewriteCond $1 !^(index\.php|assets|images|files|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]
我的文件夹的根目录如下
project
| application
| | config
| | | config.php
| | | routes.php
| | modules
| | | login
| | | | models
| | | | | ...
| | | | views
| | | | | ...
| | | | controllers
| | | | | home.php
|.htaccess
结果:
404 页面未找到
找不到您请求的页面。
我需要帮助..谢谢!
【问题讨论】:
-
出现该错误的 URL 是什么?是 CodeIgniter 404,还是浏览器默认的 404?
-
CodeIgniter 自己的,但是如果控制器向我显示默认出现的“欢迎”
-
@Jean_Paul 什么是“CodeIgniter 拥有”?主页是否有效,但其他页面无效,因为这意味着 RewriteEngine 有问题,并且由于您的
.htaccess文件看起来不错,我会检查它是否已在您php.ini中启用。 -
Error 404 is the same CodeIgniter , ini.php has been configured , is hosting on a website, but if I answer the driver that come by default , others not :(
-
@Jean_Paul 我无法理解。你说的是共享主机?你指的是什么司机?是主页“根”网址还是子页面?
标签: codeigniter