Hi.
I have two questions for you about Url Rules or htaccess file.
Now I have:
'baseUrl' => '/',
'enablePrettyUrl' => true,
'showScriptName' => false,
'rules' => [
'/' => 'site/index',
'ad/<id:\d+>' => 'ad/view',
]
And it works, when I type ad/NUMBER it displayed correctly advertisement, but I would like to show it like this:
ad/NUMBER/TITLE
how to do it?
And second question:
How to set the Url Rules for specific id?
for example:
I have ad/show?category[id]=1
How to change it to display the name of the category depending on the number ?
ad/show?category[id]=1 ----> cars
ad/show?category[id]=2 ----> house
etc.