I did some work locally on CodeIgniter web application. It works fine locally but when uploaded to live server.
I get blank page and when checked through the Firebug, I got internal server error message in console of Firebug.
I am searching for solution from 2 days and there are a lot of answers to internal server error like .htaccess might be misconfigured or mod_rewrite might not be enabled etc.
Here what I have tested so far.
1. mod_rewrite is working fine on cpanel linux shared hosting server. Also tested it to make sure by creating a simple .htaccess file and test2.php file.
2. .htaccess seems fine to me, I have tried many other approaches but no use, however this .htaccess works for me on wampp and xampp servers locally.
DirectoryIndex index.php <IfModule mod_rewrite.c>
Options +FollowSymLinks -Indexes RewriteEngine on
#RewriteBase /projects/HouseRentSystem RewriteBase /demos/hrs
# Hide the application and system directories by redirecting the request to index.php
RewriteRule ^(application|system|\.svn) index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L] </IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 index.php </IfModule>
But to make sure, I have also tried to remove the .htaccess and directly accessed the controller by using the index.php in url. but no success there so its not .htaccess issue as even with index.php I get the internal server error.
3. Tested if base URL or database settings might not be ok. But they are OK.
I am confused what to check more? Why I can't make this application to work on my shared hosting?
Here is the application link getting error. It's a blank page. Error shows in console.
Checked the Error log in cPanel to see if any error there, but it's empty.
Update:
Thanks to @vinod Tigadi
Finally found out some issues.
Error log of cpanel is empty, but needed to check the error log in root folder of my application/project.
Plus I had prefix defined in config was
$config['subclass_prefix'] = 'MY_';
whereas my main controller file name was My_Controller, y
was small.
I could not know of this change because of blank page and no errors and didn't knew of error log file location.