Welcome Guest, Not a member yet? Register   Sign In
Route Everything But ...
#1

[eluser]deltajam[/eluser]
Hi, I would like to route everything but a single controller. How is this possible?

$route[':any'] = "main";
$route['[^(controller)+]'] = "$1";

?
#2

[eluser]Michael Wales[/eluser]
Routing works from the top-down, so try something like this:

Code:
// This should account for additional URI segments, if they exist
$route['mycontroller(:any)'] = 'controller$1';
// Your catch-all
$route['(:any)'] = 'main';
#3

[eluser]deltajam[/eluser]
Thank you, I dug into the forums more and figured it out.




Theme © iAndrew 2016 - Forum software by © MyBB