I have the following in my config/main.php.
'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName'=>false,
'rules'=>array(
'<controller:\w+>'=>'<controller>/list',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
'<controller:\w+>/<id:\d+>/<title>'=>'<controller>/view',
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'\?r=<controller:\w+>/<action:\w+>' => '<controller>/<action>'
),
),
And this is my .htaccess:
Options +FollowSymLinks
IndexIgnore */*
<IfModule mod_rewrite.c>
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
</IfModule>
Everything works fine with the friendly urls, for example I can access my actions with something like:
foo dot com /foo/test/param/1
But I want the get url to also work, because I have lots of urls that I don’t want to rewrite and I don’t need them to be seo-friendly. So the following url is not working right now, it shows the index instead of the correct action:
foo dot com /index.php?r=foo/test¶m=1
Is there a way to have the urlFormat set to ‘path’ and still keep the ‘get’ format working?