UrlManager not working properly

I’ve got the problem that I still got the url format in some parts in my url. Like “?id=2” for example … everything else works like I want it.

Thats how my UrlManager config looks like:

'urlManager' => array(

            'showScriptName' => false,

            'urlFormat' => 'path',

            'rules' => array(

                'dimanzo' => 'site/login',

                'prod.1' => 'statistic/index',

                'prod.2' => 'newsletter/create',

                'prod.3' => 'entry/index',

                'entry/<id:\d+>/<title:.*?>' => 'entry/view',

                'entries/<tag:.*?>' => 'entry/index',

                '<controller:\w+>/<action:\w+>' => '<controller>/<action>',




Options +FollowSymLinks

IndexIgnore */*

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

The second question I have is: How is it possible, to deactivate the old links? Example of the UrlManager config above:

'prod.3' => 'entry/index',

make just the ‘prod.3’ work and disable the ‘entry/index’.

Thanks a lot in advance,


Question1. Try this:

'<controller:\w+>/<action:\w+>/*' => '<controller>/<action>',

Question2. Since “entry/index” matches the rule above , it can’t be disabled.

EDIT: You can disable the built-in routing mechanism, just set useStrictParsing property to true in urlManager config, but then you have to define a rule for each page of your site.

Hmm I tried this, but it still doesn’t work … the next step would also be to have and url like that:


where “welcome” is the title of the post … but like I sayed … still the “/id” thing doesn’t work. :frowning:

All right, i will think about that but this seems to be not the option I’m looking for at the moment. But good to know! - Thanks a lot!


hmm … noone with an idea? :-/

… last try … :-/