Results 1 to 9 of 9
Enjoy an ad free experience by logging in. Not a member yet? Register.
Error 404 in LAMP Server for Codeigniter Projects
I'm using a LAMP server for hosting our company applications. But when I try to host projects that are done using Codeigniter framework it gives the following error while accessing sing the index.php file
404 Page Not Found
The page you requested was not found.
- Join Date
- Jan 2012
Do you have mod_rewrite enabled in Apache?
Is your .htaccess is configured correctly?? In case if your application is hosted in sub-directory, you need to reconfigure the .htaccess.
You can cross check your setup with this user guide available in CI site.
Thanks for your replies. Here in a Ubuntu 10.10 OS I'm finding that the httpd.conf is empty when I try to vi and edit it. and it's in /etc/apache2 directory. Instead of httpd.conf I can find apache2.conf. There I could not find any lines that mod_rewrite has been enabled.
About the .htaccess file there is a .htaccess file inside the Codeigniter project. There is no other .htacess files in the directory hierarchy
/etc/apache2/apache2.conf is the correct file. The simplest way to see if mod rewrite is enabled is to runCode:
I'll try what you say. Will send the feedback.
I'm wondering if it something to do with the configuration or the internal routing (if codeigniter uses that)
After searching in the Internet got some solution. Inside Codeigniter project have to do the change
If you look at the Router.php located inside system/libraries then you will find a line at number 88 where
$this->default_controller = ( ! isset($this->routes['default_controller']) OR $this->routes['default_controller'] == '') ? FALSE : strtolower($this->routes['default_controller']);
if you notice at the end of the ternary they are forcing a strtolower operation on the controller name. I removed that method and simply let the original name be used at this point by changing the line to this.
$this->default_controller = ( ! isset($this->routes['default_controller']) OR $this->routes['default_controller'] == '') ? FALSE : $this->routes['default_controller'];