How to fix 404 page not found error in CodeIgniter

So I was working on this nice application using codeIgniter. The application ran smooth on my local wamp server, but when I uploaded... I get this monster 404 page not found.

Posted  285 Views updated 5 months ago

So I was working on this nice application using Codeigniter. The application ran smoothly on my local wamp server, but when I uploaded... I get this monster 404 page not found.

I did some search and below was a perfect fix; I hope this helps someone also.

Step One:... Open .htaccess file in the root folder and replace with code below

RewriteEngine on

RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L] 

Step Two

open application/config/routes.php make sure your default controller is set

$route['default_controller'] = 'home/view';

 

An that's it. make a tradition to backup before debugging to avoid even bigger problems.

Merci


Your reaction?

1
LOL
0
LOVED
0
PURE
0
AW
0
FUNNY
0
BAD!
0
EEW
0
OMG!
0
ANGRY
0 Comments