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' => 'Project name',
'components' => array
(
'errorHandler' => array('errorAction'=>'site/error'),
'request' => array('enableCsrfValidation'=>true),
'urlManager' => array
(
'urlFormat' => 'path',
'showScriptName' => false,
'rules' => array('index.html' => 'site/index','register.html' => 'user/register')
)
),
'import' => array
(
'application.components.*',
'application.controllers.*'
)
);
?>
[/PHP]
this is my controller
[PHP]
<?php
class SiteController extends Controller
{
public function actionIndex()
{
$this->renderText(
CHtml::link('Register', 'register.html')
);
}
public function actionError()
{
if(false !== ($error = Yii::app()->errorHandler->error ))
$this->render('error_404');
else
$this->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