Urlmanager Isn't Working

Hey guys,

Look, this is my config

this is .htaccess

[PHP]

RewriteEngine on

if a directory or a file exists, use it directly

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

otherwise forward it to index.php

RewriteRule . index.php

[/PHP]

[PHP]

<?php

return array

(

'name' =&gt; 'Project name',





'components' =&gt; array


(


    'errorHandler' =&gt; array('errorAction'=&gt;'site/error'),


    'request' =&gt; array('enableCsrfValidation'=&gt;true),


    'urlManager' =&gt; array


    (


        'urlFormat' =&gt; 'path',


        'showScriptName' =&gt; false,


        'rules' =&gt; array('index.html' =&gt; 'site/index','register.html' =&gt; 'user/register')


    )


),





'import' =&gt; array


(


    'application.components.*',


    'application.controllers.*'


)

);

?>

[/PHP]

this is my controller

[PHP]

<?php

class SiteController extends Controller

{

public function actionIndex()


{


    &#036;this-&gt;renderText(


        CHtml::link('Register', 'register.html')


    );


}    


public function actionError()


{


    if(false &#33;== (&#036;error =  Yii::app()-&gt;errorHandler-&gt;error ))


        &#036;this-&gt;render('error_404');


    else


        &#036;this-&gt;render('error_500');


}

}

?>

[/PHP]

if I enter to register.html, it will use action site/index and no user/register

if I enter to asdadas.html for example it still use action site/index and no site/error

How do I fix it?

thansk ;)

Your rules looks really weird!

What are you trying to accomplish?

Your index action also looks goofy…

[size=2]Now, put back the original URL manager configuration, please.[/size]

And then set the urlSuffix property to ‘html’ - and that’s it.

http://www.yiiframework.com/doc/guide/1.1/en/topics.url#faking-url-suffix

this is the new config,

but still, i can’t find the problem…

how do i fix it?




<?php

return array

(

    'name' => 'Project name',

    

    'components' => array(

        'errorHandler' => array('errorAction'=>'site/error'),

        'request' => array('enableCsrfValidation'=>true),

        'urlManager' => array(

            'urlFormat' => 'path',

            'rules' => array(

                'register.html' => 'user/register'

            )

        )

    ),

    

    'import' => array(

        'application.components.*',

        'application.controllers.*'

    )

);


?>



I don’t know what prevents you from reading the documentation that I so kindly linked to? ;)

Anyway…





		'urlManager'=>array(

			'urlFormat'=>'path',

            'showScriptName' => false,

            'urlSuffix' => 'html',

			'rules'=>array(

                '<action:(login|logout)>' => 'user/<action>',

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

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

			),

		),