urlManager Problem

Hi all,

firstly… this is my first post, and i am new to yii framework, so please don’t pond at me.

I have problem with url mapping for the framework.

my config for urlManager in config file "main.php" under components key is:


    'urlFormat'=>'path', // i try get as urlFormat

    'showScriptName' => false,

    'useStrictParsing' => true,


        '<page:\w*>' => 'site/display',


          i also try:

          'static/<page>', // and go to url http://yiicms.local.dev/static/somepage, but error 404 error




i need this thing:

everything is routed to site controller and display action with one parameter (page) as page url, which i find in page table in db and couple of parameters for module specification.

if i run this url in browser:


i get error404 page from site controller and error action

my site controller and display action source is:

public function actionDisplay() {

    echo "<pre>".print_r($_REQUEST,1)."</pre>";

    echo "<pre>".print_r($_GET,1)."</pre>";

    echo "<pre>".print_r($_POST,1)."</pre>";



if i am thinking right, every string after base url, in my couse: http://yiicms.local.dev/

will be redirected to site controller and display action

where is problem??

thanks for your responses

What’s with your .htaccess ?

default that comes with yii

You need this one - http://www.yiiframework.com/doc/guide/topics.url#hiding-x-20x