Results 1 to 9 of 9
Hi,
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 ...
- 01-12-2012 #1
Error 404 in LAMP Server for Codeigniter Projects
Hi,
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
What should I do pls? This happens only for the above mention framework projects but normal php applications runs without any problem404 Page Not Found
The page you requested was not found.
Thanks
- 01-12-2012 #2
I'm not familiar with codeigniter but most of these frameworks have the concept of internal routing. If your application is set up to route from the webroot (http://thesite) but the site is served from a subdirectory (http://thesite/somefolder), that could cause the issue.
If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)
My new blog. It's probably not as good as I think it is.
- 01-12-2012 #3Just Joined!
- Join Date
- Jan 2012
- Posts
- 4
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,
Aruns
- 01-13-2012 #4
Dear All,
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
Thanks
- 01-13-2012 #5
/etc/apache2/apache2.conf is the correct file. The simplest way to see if mod rewrite is enabled is to run
as root and if it gets enabled, bounce the service withCode:a2enmod rewrite
Code:/etc/init.d/apache2 restart
If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)
My new blog. It's probably not as good as I think it is.
- 01-13-2012 #6
Thanks Elija,
I'll try what you say. Will send the feedback.
Thanks
- 01-17-2012 #7
- 01-18-2012 #8
I'm wondering if it something to do with the configuration or the internal routing (if codeigniter uses that)
If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)
My new blog. It's probably not as good as I think it is.
- 01-20-2012 #9
Hi,
After searching in the Internet got some solution. Inside Codeigniter project have to do the change
But this method take some time to load the page than normal projects but doesn't give the 404 error
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'];
Thanks


Reply With Quote
