Welcome Guest, Not a member yet? Register   Sign In
Route: 404-override with variables
#1

[eluser]Zario[/eluser]
Hello! I'm trying to add a 404_override route in my application, however, it doesn't work as expected.

I'd prefer that when I try to access .com/this/doesnt/exist (which doesn't exist..), that it'd remember the path. But I can't get it working like a normal route.

Examples of what I've been trying (separately)

Code:
$route['404_override(:any)'] = 'start/handler/$1';
$route['404_override'] = 'start/handler/$1';

Is there any way to accomplish this task?
#2

[eluser]CroNiX[/eluser]
$route['404_override'] = 'start/handler'; is all you should need (and all that will work...you can't customize it other than telling it the controller/method to use for the 404 controller). Isn't the bad url still in the browser address bar when you access the bad page? You can grab it from within start/handler() using current_url() from the URL Helper.
#3

[eluser]Zario[/eluser]
Thanks a billion mate!




Theme © iAndrew 2016 - Forum software by © MyBB