• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Route: 404-override with variables

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)

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

Is there any way to accomplish this task?

$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.

Thanks a billion mate!

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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