I need a codecode, so all of the following URLs:
admin/users/page/:num
admin/accounts/page/:num
members/results/page/:num
products/page/:num
are sent to
admin/users/index
admin/accounts/index
members/results/index
products/index
respectively. I would like only one regex that could do the trick, not me, setting routes manually each time.
To be specific, any URL that ends with page/:nummust be redirected to the appropriate controller index method. And by :numI mean any number.
Is it possible?
source
share