• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is 404_override useful?

#1
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.
Support Development  • Practical CodeIgniter 3  •
Myth:AuthVulcan - CLI Tools for CI4
Reply

#2
(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
download and make your system directory strict
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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.