Scriptbaker
ScriptbakerAI & Software Engineering
Yii

Remove index.php from URL in YII

1- Open root/protected/config/main.php and uncomment the UrlManager 2- Create .htaccess file and place it on the root of your site. Contents of .htaccess s

· 5 min read

1- Open root/protected/config/main.php and uncomment the UrlManager
yii_urlManager
2- Create .htaccess file and place it on the root of your site. Contents of .htaccess should be

 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