Hi,
I need make some routes, like this:
'dormitorios' => 'environments/index/id/9',
'salas' => 'environments/index/id/10',
'quartos' => 'environments/index/id/11',
How i can do it in configuration file?
Thanks.
Hi,
I need make some routes, like this:
'dormitorios' => 'environments/index/id/9',
'salas' => 'environments/index/id/10',
'quartos' => 'environments/index/id/11',
How i can do it in configuration file?
Thanks.
Hi,
These rules should work fine, just add them here:
// uncomment the following to enable URLs in path-format
'urlManager' => array(
'urlFormat' => 'path',
'rules' => array(
'dormitorios' => 'environments/index/id/9',
'salas' => 'environments/index/id/10',
'quartos' => 'environments/index/id/11',
'<controller:\w+>/<id:\d+>' => '<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',
'<controller:\w+>/<action:\w+>' => '<controller>/<action>',
),
),
in main.php, the three last rules I have were the defaults in my config. I haven’t played around with this a lot, so I’m not an expert. But when I tested a very similar rule in one of my projects it worked.
hi
It doesnt work.
When i use:
'dormitorios' => 'environments/index/id/9',
'salas' => 'environments/index/id/10',
'cozinhas' => 'environments/index/id/11',
'offices' => 'environments/index/id/12',
'infantil' => 'environments/index/id/13',
The url of links doesnt work, but if i access:
It redirect to “'environments/index/id/10”
But the link doesnt change.