I created an app via Code Igniter and everything works fine in xampp. But when I launch it on my webserver (Hawkhost), I got this error:
Fatal error: Class 'MY_controller' not found in /home/deremoec/public_html/an.deremoe/application/controllers/search.php on line 5
I already renamed the base_url from webhost to my domain.
I also renamed my .htaccess to the current webserver folder.
For a clear understanding
$config['base_url'] = 'http://an.deremoe.com/';
My .htaccess
RewriteEngine On
# Put your installation directory here:
# If your URL is www.example.com/, use /
# If your URL is www.example.com/site_folder/, use /site_folder/
RewriteBase /an.deremoe/
# Do not enable rewriting for files or directories that exist
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# For reuests that are not actual files or directories,
# Rewrite to index.php/URL
RewriteRule ^(.*)$ index.php/$1 [PT,L]
This is indeed a problem with case sensitivity, just like what zourite said. The problem here is that, you have to name the file
MY_Controller.phpand the classMY_Controller. Notice the uppercase “C”.