Extra Characters In Url. Need Help Removing With Url Manager.

Currently I get the following format of url from one of my actions


/mycontroller/action?0%5Bparam%5D=1

Where it needs to be like this without the extra characters in the url


/mycontroller/action?param=1

I’m fairly new to yii, but I’m assuming this can and should be done through the url manager in my main.php config file. I have no idea how to get this so that it rewrites this url and removes these extra characters. Any help would be greatly appreciated.

Heres my url manager code right now with rules that apply to all controllers


'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>',

			),

		),

hmm… figured there would be an easy fix for this. would anyone have an idea as to how the url is getting extra characters to begin with?

You don’t need to remove those chars, you just have to not generate them :)

Find a place where this URL is constructed, is seems like you’re passing an array of values instead of just one value.

Perfect! Thanks for the tip. Noob mistake apparently. Was passing an array with just one value in it. Fixed it so that its just passing the one value without placing it in an array and it works as intended now.