Welcome Guest, Not a member yet? Register   Sign In
Use different 404 page on front-end and back-end
#6

(09-28-2015, 06:09 AM)Narf Wrote: Actually, it's quite the opposite ... 404_override may be a single value, but it points at what to look for in the current directory and then naturally falls back to the root one.

When you have application/controllers/Error404.php and application/controllers/admin/Error404.php, setting $route['404_override'] to 'Error404' will cause admin/Error404.php to be loaded if you visit /admin/non-existing-uri.

I do have to say this though - you shouldn't 404 based on whether items exist in a list or not. The list itself still exists, even if empty.

So basically if I understand this correct, I can simply create:

Code:
application/controllers/admin/Error404.php

application/controllers/Error404.php

and set in my routes $route['404_override'] = 'Error404';

So basically with this setting if I'm on public site and visit my-site.com/non-existing-uri,  I 'll be redirected to Error404, whereas if I access
my-site.com/admin/non-existing-uri, I will be redirected to admin/Error404, am I right ???
Reply


Messages In This Thread
RE: Use different 404 page on front-end and back-end - by Lykos22 - 09-28-2015, 06:51 AM



Theme © iAndrew 2016 - Forum software by © MyBB