Hi, i am new to YII. i am having issues with friendly URLs.
What i am trying to do is , i want to access same action for multiple routes. For Examples
'<affusername:[a-z0-9_\.]+>/browse'=>'product/index',
'/browse'=>'product/index'
These URLs work fine But when i try to use below URLs to access same action, it gives me error.
1- 'browse/category/<parentcatname:[-_a-z]+>/<categoryname:[-_a-z]+>/<categoryid:[0-9]+>'=> 'product/CategoryProducts',
2- '<affusername:[a-z0-9_\.]+>/browse/category/<parentcatname:[-_a-z]+>/<categoryname:[-_a-z]+>/<categoryid:[0-9]+>'=> 'product/CategoryProducts',
Controller:
class ProductController extends Karmora
{
public function actionCategoryProducts($affusername=NULL, $parentcatname, $categoryname, $categoryid)
{
echo $affusername;exit;
}
}
For URL 2, it is working fine but when i use url 1, it gives me error
"[size="5"]Error 400[/size]
Your request is invalid."
please guide me whats wrong with multiple parameter passing?