Welcome Guest, Not a member yet? Register   Sign In
Is 404_override useful?
#1

(This post was last modified: 05-18-2015, 11:48 AM by kilishan.)

I'm really struggling to see valid use-cases for the 404_override setting in the router. Since it only applies if it's managed to match it to a route but the controller/method is missing - isn't that only good for during development since it basically tells you that you mis-mapped a route or have a bad controller/method name?

EDIT: Ok, after trying some more (and not just reading through the code and manual) it does work for people visiting pages that don't exist on the site. Silly me. Would still love to hear the ways you use it, though.

If you've found it useful - how do you use it? I'd love to get to know that function better.
Reply
#2

(This post was last modified: 05-19-2015, 12:56 AM by John_Betong.)

(05-18-2015, 11:43 AM)kilishan Wrote: ...
...
EDIT: Ok, after trying some more (and not just reading through the code and manual) it does work for people visiting pages that don't exist on the site. Silly me. Would still love to hear the ways you use it, though.  

If you've found it useful - how do you use it? I'd love to get to know that function better.

I have $route['404_override'] = "c_A__SEARCH_URL/index"; which parses the URI and finds the nearest match otherwise a modified 404.php page
Reply
#3

I also use the override. In my CI application I have slugs for every content and with the override I can simply send the url to a controller that can look the slug in the database and serve the specific content.
Reply
#4

It is useful.
http://iridadesign.com/starter-public-ed...ssing-page
Reply




Theme © iAndrew 2016 - Forum software by © MyBB