为什么Codeigniter不处理所有传入的请求

时间:2017-05-06 01:55:47

标签: php apache codeigniter routing http-status-code-404

当我在浏览器apache的错误页面中显示基本网址后输入了错误的网址而不是codeigniter的“找不到”错误页面时。

例如:

somesite.com/index.php/some_wrong_page => Codeigniter 404 page(which is fine)

somesite.com/some_wrong_page => I get apache's "not found" page(which is not what i want)

我有一个.htaccess指向站点根目录中的默认codeigniter的index.php:

php_value register_globals 
php_value upload_max_filesize 20M
php_value post_max_size 20M
php_flag display_errors on
php_value error_reporting 1

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?path=$1 [NC,L,QSA]

修改

这是我文件结构(linux / apache)的一个非常准确的例子:

-- ROOT
----system(codeigniter resides here, which index.php redirects everything to)
----.htaccess(which redirects everything to index.php below)
----index.php

修改

任何人都可以帮助我吗?

0 个答案:

没有答案
相关问题