Clean Url Problems

Hi all,

I am having an issue trying to use the CUrlManager. This is my first time attempting to use it, so if I am just being an idiot, please be gentle.

I have a kind of unusual set up to my website, such that the urls are like

/index.php?r=site/page&view=portfolio.overview

this page would be listed under /views/site/pages/portfolio/overview

I have tried setting up the main.config file to




'urlManager'=>array(

                        'showScriptName'=>false,

                        'urlFormat'=>'path',

                        'rules'=>array(

                                '<controller>/<view>'=>'<controller>/<view>',

                                '<controller>/<view>'=>'<controller>.<view>',

                        ),

                ),




and used




$this->createUrl($_REQUEST['view'])



and a few other variations. So far, nothing but errors and page not founds to show.

Any thoughts or suggestions will be appreciated.

Try this in config/main.php





//// uncomment the following to enable URLs in path-format

		'urlManager'=>array(

			'urlFormat'=>'path',

			'rules'=>array(

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

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

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

			),

		),



Coda,

Thanks for the suggestion. Unfortunately it didn’t seem to do the trick. Thanks for the ideas though. I may try re working the setup of my website to make it more “standard” and easier to integrate with the urlManager