Welcome Guest, Not a member yet? Register   Sign In
How to make request to non-existent controller mapped to given controller?
#4

[eluser]Morgan Cheng[/eluser]
@mattpointblank, it works with a "_remap" method defined in "usercontroller" to handle any kind of URL.

The codeigniter document doesn't mention sequence of routes. It seems that the sequence doesn't matter.

Code:
$route['(:any)'] = "test/$1";
$route['timeline'] = "timeline"

and

Code:
$route['(:any)'] = "test/$1";
$route['timeline'] = "timeline"

have same effect.

[quote author="mattpointblank" date="1272639695"]In application/config/routes.php:

Code:
$route['(:any)'] = "usercontroller/$1";

This will send any link like yoursite.com/parameter to usercontroller/parameter. The drawback of this is that for every 'static' controller you create, you'll have to add it as a route.[/quote]


Messages In This Thread
How to make request to non-existent controller mapped to given controller? - by El Forum - 04-30-2010, 05:44 AM



Theme © iAndrew 2016 - Forum software by © MyBB