Hi,
for my current (advanced) project i just need one controller (SiteController). So there is no need to show it in the url. Thats why i added this rule to the frontend config:
'urlManager' => [
'rules' => array(
'<alias:product|contact|about>' => 'site/<alias>',
),
This is working fine and localhost/product points to localhost/site/product.
Of course, i activated prettyUrl and added the this default rules to the common config:
'rules' => array(
'<controller:\w+>/<id:\w+>' => '<controller>',
'<controller:\w+>/<action:\w+>/<id:\w+>' => '<controller>/<action>',
'<controller:\w+>/<action:\w+>' => '<controller>/<action>',
),
Now i want to access a GET parameter like this: localhost/product/productname. But i get the error:
but localhost/site/product/productname is working properly… The “productname” should be $_GET[‘id’]. What do i have to change to make this happen?
Thanks!