Static Pages?

I can’t seem to get rid of the site/page?view=about generated link…

My rules:


'urlManager'=>array(

			'urlFormat'=>'path',

			'showScriptName' => false,

			'rules'=>array(

				'<controller:\w+>/<id:\d+>'=>'<controller>/view',

				'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',

				'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',

				'<view:\w+>'=>'site/page',

			),

		),

I see from older posts that the behavior of the SiteController (default installation) has changed and now it includes the actions functions (which in turn calls the CViewAction class.

Could it this be due that reason? Or is it normal behavior now to include the full ?view= query?

Hi petkostas,

I think that for static pages is how you will see the url, atleast I see my static page in the same way.

Regards

Thanks for the reply…although this seems a bit weird…last time I played with YII I remember I could get the static page links working like site/about etc…

Don’t know because I am a cake developer and I am just playing around with Yii when I get free time…anyone else can confirm this behavior?

Got it working (makes sense) had to add the rules before everything else (although most forum posts suggest to add them at the end):


		'urlManager'=>array(

			'urlFormat'=>'path',

			'showScriptName' => false,

			'rules'=>array(

				'view/<view:\w+>' => 'site/page',

				'admin/login'=>'admin/user/login',

				'admin/logout'=>'admin/user/logout',

				'admin/<controller:\w+>/<action:\w+>/<id:\d+>'=>'admin/<controller>/<action>',

				'<controller:\w+>/<id:\d+>'=>'<controller>/view',

				'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',

				'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',

			),

		),