当前位置: 代码迷 >> PHP >> 使用codeigniter出现404有关问题
  详细解决方案

使用codeigniter出现404有关问题

热度:104   发布时间:2016-04-29 01:05:02.0
使用codeigniter出现404问题
各位好,初使用codeigniter出现了如下问题:

1、windows xp下运行正常,linux下运行出现404错误。
2、访问主页可以显示(http://ip地址/项目名/或http://ip地址/项目名/index.php/index),但是点登录时(http://ip地址/项目名/index/login)出现404错误,index控制器中是存在public的login方法。
3、linux环境为red hat 企业版5 ,apache为2.0.64,php为5.4.3 apache配置了rewrite也 加了path info

尝试过修改config.php中的uri_request 为各个可能的值(query_string,auto等)现象依旧。

看codeigniter的日志似乎login.php已经发送到浏览器了,但是为什么还是404呢

同样的程序在windows下没有问题,请问大家问题可能出在哪里呢?谢谢!
附codeigniter日志:
DEBUG - 2012-06-01 09:42:54 --> Config Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Hooks Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Utf8 Class Initialized
DEBUG - 2012-06-01 09:42:54 --> UTF-8 Support Enabled
DEBUG - 2012-06-01 09:42:54 --> URI Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Router Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Output Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Security Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Input Class Initialized
DEBUG - 2012-06-01 09:42:54 --> XSS Filtering completed
DEBUG - 2012-06-01 09:42:54 --> Global POST and COOKIE data sanitized
DEBUG - 2012-06-01 09:42:54 --> Language Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Loader Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Controller Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Helper loaded: form_helper
DEBUG - 2012-06-01 09:42:54 --> Form Validation Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Session Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Helper loaded: string_helper
DEBUG - 2012-06-01 09:42:54 --> Encrypt Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Database Driver Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Session routines successfully run
DEBUG - 2012-06-01 09:42:54 --> DX Auth Initialized
DEBUG - 2012-06-01 09:42:54 --> Session class already loaded. Second attempt ignored.
DEBUG - 2012-06-01 09:42:54 --> Config file loaded: application/config/dx_auth.php
DEBUG - 2012-06-01 09:42:54 --> Language file loaded: language/japanese/dx_auth_lang.php
DEBUG - 2012-06-01 09:42:54 --> Model Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Model Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Model Class Initialized
DEBUG - 2012-06-01 09:42:54 --> utilityies class already loaded. Second attempt ignored.
DEBUG - 2012-06-01 09:42:54 --> Helper loaded: url_helper
DEBUG - 2012-06-01 09:42:54 --> Config file loaded: application/config/access_limit.php
ERROR - 2012-06-01 09:42:54 --> Severity: Notice --> Undefined variable: message /usr/local/apache2/htdocs/tab/application/views/login.php 44
DEBUG - 2012-06-01 09:42:54 --> File loaded: application/views/login.php
DEBUG - 2012-06-01 09:42:54 --> Final output sent to browser
DEBUG - 2012-06-01 09:42:54 --> Total execution time: 0.0547


------解决方案--------------------
先尝试一下这样是否可以
http://ip地址/项目名/index.php/index/login
http://ip地址/项目名/index.php/login
  相关解决方案