M
M
Maxim2013-12-22 20:00:38
Yii
Maxim, 2013-12-22 20:00:38

How to write a rule for urlManager?

You need a rule that will replace the address from "site/page/about" to "about".

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
FreeAero, 2013-12-22
@Frapsy

'<name:(about)>' => 'page'
This is Route, when accessing about, it will refer to the page controller and the about method
, but it does not replace anything, you can replace it with a redirect:
$this->redirect(array('about'), true, 301);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question