Friendly urls - urlFormat 'get' and 'path' at the same time

I have the following in my config/main.php.









            '\?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


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&param=1

Is there a way to have the urlFormat set to ‘path’ and still keep the ‘get’ format working?