problem with 'showScriptName'=>false

Hi, I am trying using yii framework rewrite a website.

the website has a enter page just a swf and a link to main page.

so I move the original enter page to views/layouts

and write simple enter.php in views/site




<?php

$this->pageTitle=Yii::app()->name;

$this->layout = '//layouts/enter';

?>



then write a index.php in views/site hope to use it as main app home page




<?php

$this->pageTitle=Yii::app()->name;

$this->layout = '//layouts/main';

echo 'test page';

?>



In the SiteController.php, I put those code.




	public function actionIndex() {

		$this->render('enter');

	}


	public function actionMain() {

		$this->render('index');

	}



It works fine with <?php echo $this->createUrl(‘site/main’);?>

and I can see the "test page" echo by /index.php?r=site/main,

but when I add ‘showScriptName’=>false in config in order to hide index.php,

the link create by <?php echo $this->createUrl(‘site/main’);?> return 404.

What should I do?

Thank you.

Have you added the .htaccess file - http://www.yiiframework.com/doc/guide/1.1/en/topics.url#hiding-x-20x

Thank you very much,

it works after add a .htaccess file.