• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
route all uri to one special uri except some cases

#1
I want all uri of my site route to one controller. Except The uri starting with home, admin, login or sigun_up will not route to that one controller. How would you do that?

I'm thinking some kind of reg ex, something like this

$route["all link route to this bosss controller, except uri starting with admin, login, home and sign_up"] = 'boss controller';
Reply

#2
What about
PHP Code:
$route['^(admin|login|home|sign_up)'] = 'other_controller'
$route['(:any)'] = 'both_controller'

Reply

#3
that's exactly what i'm looking for. Thanks
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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