Ok, here goes a fine tip to remove the “index.php” from the URL. I did it on Apache with mod_rewrite on.

In your httpd.conf file

LoadModule rewrite_module modules/mod_rewrite.so

First of, create a .htaccess file in the roor directory of your webapp (where index.php is), and put the following in it

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

OK. Now it’s time to make some changes in the protected/config/main.php file.

Find the URLManager section and swap it for this.

'urlManager'=>array(
    'urlFormat'=>'path',
    'showScriptName'=>false,
     'caseSensitive'=>false,        
),

Et voilĂ , this worked for me.