Hello everyone, at the beginning of the use of CodeIgniter, there are the following problems:
1, Windows XP running Normal, Linux under the operation of 404 error.
2, access to the home page can be displayed (HTTP://IP address/project name/or HTTP://IP address/project name/index.php/index), but at the point of login (HTTP://IP address/project name/index/login) there is a 404 error, The login method for the public is present in the index controller.
3, the Linux environment for Red Hat Enterprise Edition 5, Apache for 2.0.64,php for 5.4.3 Apache configuration rewrite also added path info
Attempts to modify the uri_request in the config.php for each possible value (Query_string,auto, etc.) are still in effect.
Look CodeIgniter's log seems to have been login.php sent to the browser, but why still 404?
The same program does not have a problem under Windows, can you tell us where the problem may be? Thank you!
Attached CodeIgniter log:
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 and 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-to-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--and 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 and 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/APPL Ication/views/login.php 44
Debug-2012-06-01 09:42:54-to 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 to total execution time:0.0547
Reply to discussion (solution)
Let's try it out first if it's possible
HTTP://IP address/project name/index.php/index/login
HTTP://IP address/project name/index.php/login
Back to Boss:
HTTP://IP address/project name/index.php/index/login can be accessed
HTTP://IP address/project name/index.php/login cannot be accessed
How do I change to make HTTP://IP address/project name/index/login can access it, thank you!
I set index_page in config.php to index.php after HTTP://IP address/project name/index.php/index/login will automatically appear, under Windows Index_ Page is not set but HTTP://IP address/project name/index/login can be accessed.
If
HTTP://IP address/project name/index.php/index/login can be accessed
HTTP://IP address/project name/index/login cannot be accessed
That's your rewrite rule is wrong, please check it.
The difference between the two is that the latter need to hide the index.php file name
Should write under Window
Rewritecond%{request_filename}!-d
Rewritecond%{request_filename}!-f
Rewriterule ^ (. *) $ index.php/$1 [qsa,pt,l]
Linux should also be the same, please verify
It is recommended to first confirm the log under application/errors/, I encountered the problem due to the controllers file name contains capital letters, under Linux does not recognize the resulting, CI framework seems to assert that the class name all lowercase