简体   繁体   中英

Only welcome controller loading in codeigniter when hosted under cpanel

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

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).

:-)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM