Welcome Guest, Not a member yet? Register   Sign In
Override :any routes

I have a route setup for '/page/:any'

I'd like to override it, only if the proceeding value is 'lp', so for example

This doesn't seem to work though... Any ideas if there's a better way to override it for certain cases?

Routing rules are processed in the order in which you put them. It's not "best fit" it's "first match". So if your :any rule already matched the page/lp, that second "override" rule will never be processed.
Always put the more specific rule (‘/page/lp/:any') before the more general rule (‘/page/:any').

Ahh I had it reversed.. thank you! Smile

Theme © iAndrew 2016 - Forum software by © MyBB