With this module, you can rewrite url simply editing comments on your actions. For Example you can convert "index.php/site/index" in "/homepage" in this way:
class SiteController { /** * @Route(name="homepage"); */ public function actionIndex() { $this->render('index'); } }
Yii 1.1 or above
First of all you need to download SensorarioUrlRoute and put it in modules folder. Then edit your config file
'modules' => array( 'SensorarioUrlRoute', ... ),
Also, remeber to set urlManager:
// application components 'components' => array( ... 'urlManager' => array( 'urlFormat' => 'path', 'rules' => require __DIR__ . '/../modules/SensorarioUrlRoute/routing.php', ), ... ),
To generate url using anotations go to index.php/SensorarioUrlRoute and generate or erase all your SEO frendly url =). All routes will be stored in a particular array and just included in config file.
Be the first person to leave a comment
Please login to leave your comment.