How to remove index.php in Yii Framework

php, url, yii

Solution

Try this

A good description is available here

http://www.yiiframework.com/doc/guide/1.1/en/topics.url#hiding-x-23x

Problem

Hey guyz i am a newbie in Yii framework. I want to remove the index.php from my urls. Following the yii documentation when i put the rewrite engine code in my .htaccess file and setting showScriptName to false in my config/main.php file i get the 500 internal server error. My .htaccess file is located in root folder of my application. Tell me where i am doing wrong UPDATE: This is the code in my .htaccess file: ``` # 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 ```

Original source