How To Change The Path Of Url?

I have a question about yii URL.

For example, ‘http://localhost/example/index.php?r=site/login’, how could I change it to ‘http://localhost/example/login’?

I am able to change it to ‘http://localhost/example/index.php/login’ by editing ‘protected/config/main.php’. Below is my urlManager setting.







				'login' => 'site/login', // <-- new added rule



My question is how can I remove(hiding) the ‘index.php’ in ‘http://localhost/example/index.php/login’ ?


set ‘showScriptName’ to false