0
votes

I'm developing a new website using codeigniter, this is my first codeigniter experience. I suspect that there is something not working with the 404 error, when I try to load a controller that does not exist, or a wrong function of an existing controller, I get back the standard webserver 404 error, and not the codeigniter one.

I did not touch the "404_override" option in the route config file. Is it normal? I expect (but maybe I'm wrong) that in these cases the show_404() function is called.

2

2 Answers

1
votes

Is your .htaccess file correctly set up?

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

You have to setup an .htaccess file in order to have custom error pages working. Checkout the official documentation.

0
votes

Codeigniter should be showing it's 404 page, unless you did not remove the index.php from the URI. In that case you can try to open another file without touching CodeIgniter. Take a look here to see how to remove index.php using .htaccess.

Update:

There seems to be a solution for ISS: ISAPI_Rewrite Lite (free, lite version of a commercial product). I found it here