Closed Yahasana closed 5 years ago
How about?
['*', '/{module:[a-z-]+}[/{controller:[a-z-]+}[/{action:[a-z-]+}[/{id}[/{param}]]]]'],
not works. this rule can't match .json
try [/{param:[a-z\.]+}]
['*', '/{module:[a-z-]+}[/{controller:[a-z-]+}[/{action:[a-z-]+}[/{id}[/{param}]]]]']
DON"T WORK: http://e.com/account/user/signup/id.json
WORK: http://e.com/account/user/signup/id/a.json
public function signupAction() {
print_r(func_get_args());
}
Array
(
[0] => id
[1] => a
[2] => json
)
WORK: http://e.com/account/user/signup/id/a/b.json
public function signupAction() {
print_r(func_get_args());
}
Array
(
[0] => id/a <---------- what's wrong?
[1] => b
[2] => json
)
abandon fastroute & close
How to setup a common route to match
/module/controller/action/id/param.json