Assuming we have a page with random seo friendly url like /some/page.html How to describe rules for urlManager in config that specifies condition in where if standard rote (e.g. SomeController with actionPage) does not exitsts than performs the specified default route (e.g. DefaultController / actionDefault)?
This rule overrides default route and forwards all requests to my specified route
'urlManager' => [
...
'suffix' => '.html',
'rules'=>[
'<alias:[0-9a-zA-Z-_/]+>' => 'default/default',
]
]
In other words, algorithm should be as following:
I guessed the deal is not in routing. My problem was solved by extend urlManager class with override parseUrl method which checks for each request for existence of its url in DB. If is not present then returns parent method result. Thanks for attempt to help :)
P.S. But if this url is coincident with standard routing scheme then overrides this one.