add exception to the friendly URLs

Hello everyone.

I have a site with Yii URL friendly enabled. It works perfectly like e.g. www.mydomain.com/category/view?id=1 when there is a controller CategoryController and a views/category/view.php file.

My proble isthat I want to add my own friendly url like e.g. www.mydomain.com/ownurl/1/ and point it to the url www.mydomain.com/category/view?id=1. The problem is that there is no OwnurlController and I don’t want to add one such controller for each URL I add.

I am having trouble getting this work properly ini my .htaccess file.

Can someone please help with this?

Thanx

URL rules may be a solution (perhaps parameterized with literal "category/view")

http://www.yiiframework.com/doc-2.0/guide-runtime-routing.html#url-rules

I guess this also may be of interest

http://www.yiiframework.com/doc-2.0/guide-runtime-routing.html#creating-rules

I solved this by overwriting the runAction method in the Controller