Old URLs don't work anymore after enabling Yii mod_rewrite


Just started to using modrewrite with yii…

For some reason regular-style URLs in the format site.com/index.php?r=action/controller stop working.

If the old style links don’t work anymore, all of my old backlinks will not work anymore…

in my main.php I have the following config + .htcaccess (as proposed here: )


			'showScriptName'=>false, // Kein index.php anzeuigen.. -> Nur Sichtbar bei CreateURl?



				// a standard rule mapping '/' to 'site/index' action

				'' => 'site/index',

                                '<action:(login|logout)>' => 'user/<action>',



  • .htaccess

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