Route Problem

hi all,

this is my urlManager:


'urlManager'=>array(

			'urlFormat'=>'path',

			'rules'=>array(

				'tests/<testid:\d+>/<controller:\w+>/<id:\d+(\.\d+)?>'=>'<controller>/view',

				'tests/<testid:\d+>/<controller:\w+>/<action:\w+>/<id:\d+(\.\d+)?>'=>'<controller>/<action>',

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

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

                                'hose/<action:\w+>/<code:(.*)>'=>'hose/<action>',

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

				'test/archived/<id:\w+-\d+>'=>'test/archived',

                                'test/reliable/<id:\w+-\d+>'=>'test/reliable',

                                'test/unreliable/<id:\w+-\d+>'=>'test/unreliable',

                               

                                'test/successrateyes/<id:\w+-\d+>'=>'test/successrateyes',

                                'test/successrateno/<id:\w+-\d+>'=>'test/successrateno',

                                'hose/setrating/<testid:\w+-\d+>/<id:\w+-\d+>/<value:\w+-\d+>'=>'hose/setrating',

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

			),

                        'showScriptName' => false,

		),

in my TestController I have the action:


public function actionSave($id)

but when I call it (in POST) I get 400 bad request.

What am I doing wrong here?

thanks a lot

Hi giorg,

The url manager rules have nothing to do with a 400 bad request error.

You should check the controller code.

Hi,

thanks for the reply. In the controller my first row is a die(‘here’), 'cause I wanted to be sure that I was in the right place, but the script doesn’t die…

thanks again

Check and see whether the problem persists when you have commented out all of your url manager rules.

Maybe the problem with CSRF prevention …