Problem with routing


I have a problem with routing.

If I have controller called “group”, and in it is action “name”, my route it looks: “”. I’d to, my route was without action “name” in adress. (“”)

I tried to find a solution to my problem, but to no avail.

You should read about URL Management in the Definitive Guide to Yii.


You helped me again.

I had problem, because in config, were put default rules, and so them routing didn’t work :)



I have a one more problem. When I put in adress “index.php” all it’s ok, but when I don’t put it, appear error:

It’s my .htaccess configuration:

What’s going wrong?

Have you set showScriptName to false?

I’ve got true

My .htaccess is a bit different then yours

try it

RewriteEngine On

RewriteRule ^index\.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^.*$ /index.php [L]

It’s worse :confused:

redirect me to lower level (../)

Ok, now I’ve read the whole post

just do in your config something like :








and its done

Still the same :(

use your old htaccess and


then try again

should work

Of course, I tried to use my old .htacces, and it doesn’t work :(

sorry I meant remove


Still doesn’t work :confused:


I found solution.

First I gave in my .htaccess: (from docs)

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

Then in config:








It does work! :)

Thanks everybody :)