Question about Codeigniter url route
The $route['page/(:num)']
in the route.php of codeigniter will accept only numbers in the urls, while the $route['page/(:any)']
will accept all the characte开发者_开发知识库rs in the url. Is it possible to specify alpha-numeric values only? also letters only?
Thanks.
It would be nice, but according to the docs, you're going to need to use regular expressions.
$route['products/([a-zA-Z0-9]+)'] = "controller/method/$1";
精彩评论