Hello,
I created one module name as "videos" & I wanted to apply rewrite rule for this module
In main.php
‘urlManager’=>array(
'urlFormat'=>'path',
'rules'=>array(
'categories'=>'videos/categories',
'categories/<id>'=>'/videos/categories',
),
'showScriptName'=>false,
First Rule for the
localhost/testdrive/index.php?r=videos/categories
work as expected like
[localhost/testdrive/categories]
But I am not able to create second rule
localhost/testdrive/index.php?r=videos/categories&id=2015
TO
localhost/testdrive/categories/2015
I tried this “‘categories/<id>’=>’/videos/categories’,” rule but it given me url
localhost/testdrive/categories/id/2015