Hi,
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: )
'urlManager'=>array(
'showScriptName'=>false, // Kein index.php anzeuigen.. -> Nur Sichtbar bei CreateURl?
'urlFormat'=>'path',
'rules'=>array(
// 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
THX
Andreas