If I want to catch every non-existent URL that was submitted to my web application and provide them with a 404 maintenance-free view, how would I do it?
Essentially, I need to record statistics based on these hits, but I need to do this by showing content, not 404 error.
As far as I can tell from application/config/routes.php , I could use
$route['default_controller'] = 'catchall';
but I need this for my actual web application.
I could also use
$route['404_override'] = 'catchall';
but I do not want to throw 404s.
I tried to use
$route['(:any)'] = '$1';
but I need to write down the entire URL (for example, any segment length), and not just the first segment.
bafromca
source share