News
6, Jun 2021 04:30 AM
News
6, Jun 2021 08:46 AM
News
10, Oct 2020 02:03 AM

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  1,903 Views updated 3 years 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?

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