Welcome Guest, Not a member yet? Register   Sign In
Problem with custom 404 page :(
#5

[eluser]Clooner[/eluser]
First of all: don't redirect, if you don't want it to be redirected!

I used this method a few times over already and this will give you all the flexibility you need! In case the controller and / or funtion do not exists I suggest you make a catch all controller/function in your route
Code:
// controllers
$route['products/(:any)/(:num)'] = 'products/$1/$2';
$route['news/(:any)/(:num)'] = 'news/$1/$2';
$route['users/(:any)/(:num)'] = 'users/$1/$2';
// catch all
$route['(:any)'] = 'catch_all_ctrl/index';
// default
$route['default'] = 'lander/index';
You should place all other routes 'manually' before that. This seems like more work but it is really only a few extra lines of code.


Messages In This Thread
Problem with custom 404 page :( - by El Forum - 07-12-2010, 01:09 AM
Problem with custom 404 page :( - by El Forum - 07-12-2010, 01:19 AM
Problem with custom 404 page :( - by El Forum - 07-12-2010, 01:22 AM
Problem with custom 404 page :( - by El Forum - 07-12-2010, 01:27 AM
Problem with custom 404 page :( - by El Forum - 07-12-2010, 01:42 AM
Problem with custom 404 page :( - by El Forum - 07-12-2010, 02:03 AM
Problem with custom 404 page :( - by El Forum - 07-12-2010, 03:21 AM
Problem with custom 404 page :( - by El Forum - 07-12-2010, 03:29 AM
Problem with custom 404 page :( - by El Forum - 07-12-2010, 03:38 AM
Problem with custom 404 page :( - by El Forum - 07-12-2010, 05:47 AM
Problem with custom 404 page :( - by El Forum - 07-12-2010, 06:04 AM
Problem with custom 404 page :( - by El Forum - 07-12-2010, 06:59 AM
Problem with custom 404 page :( - by El Forum - 07-12-2010, 07:07 AM
Problem with custom 404 page :( - by El Forum - 07-12-2010, 07:15 AM
Problem with custom 404 page :( - by El Forum - 07-12-2010, 08:18 AM
Problem with custom 404 page :( - by El Forum - 07-13-2010, 01:10 AM



Theme © iAndrew 2016 - Forum software by © MyBB