yii Setting in your main.php file How to remove index.php in url.


Removed the commented lines for rewrite in httpd.conf file.

LoadModule rewrite_module modules/mod_rewrite.so

You can modify .htaccess file your application folder.

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

after you can change your main.php file code.

return array(
    // application components
            // uncomment the following to enable URLs in path-format