Wildcards are cool.
I am trying to do this:
$route["(:any)/controller"] = "controller";
basically, I want to put the wildcard in the front. It doesn't quite work, and I don't know any work around.
Wildcards are cool.
I am trying to do this:
$route["(:any)/controller"] = "controller";
basically, I want to put the wildcard in the front. It doesn't quite work, and I don't know any work around.
Should work. If it doesn't try shuffling around your route definitions to put the wildcard line at the end.
Also I don't think you need the parenthesis around :any
.
using regular expressions did the trick.. thank you for pointing out (:any) is greedy!
$route['([a-z_A-Z]+)/controller'] = 'controller';