I'm using codeigniter framework and by default i load my site controller
$route['default_controller'] = "site";
But now i want to setup the routes.php config so i could still access my controllers as before but if controller doesent exists then i'd like to run users controller and check if it's nickname so i can display that users profile.
It's something like on Facebook where you can have www.facebook.com/username
and it takes you to your user profile. But i'd like that my other controllers are still accessible www.mysite.com/site
, www.mysite.com/site/function
, etc
I have tried with :any wildcard but couldnt get it working. I have seen that some solve the problem with regex expression but i'm not good at regex and dont know how to put it together so it would work for me.