2
votes

The app which i'm creating using codeigniter is loading on my localhost. But when i uploaded the same into cpanel its showing "404 Page Not Found".

I'm able to access default welcome controller other than this it shows 404 page not found.

Below are my configuration in application/config/config.php

$config['base_url'] = '';
$config['index_page'] = '';
$config['uri_protocol'] = 'REQUEST_URI';

.htaccess configurations are as follows

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?/$1 [L]

configuration in application/config/routes.php are as below

$route['default_controller'] = 'login';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;

If I change the default_controller to welcome then welcome is loading fine.

--Thanks in advance

1
Make sure your controller's filenames are ucfirst - AdrienXL
Thanks @AdrienXL. This fixed my problem - Kiran

1 Answers

3
votes

As said in the comments : Your controller's file name must start with an uppercase. See http://codeigniter.com/userguide3/changelog.html

Changed filenaming convention (class file names now must be Ucfirst and everything else in lowercase).

:-)