0
votes

Is it possible with Yii2 change the browser url using the urlManager config?

Or am I supposed to use only:

 Yii::$app->getResponse()->redirect(Url::to([...]));

in the controller#action?

Example:

Controller Topic, Controller Reply.

Url => topic/1/reply => controllerB#index(topic_id) ...

Url => reply/1 or reply/create|view|update => reply/index page (and browser url changed)

Thanks!

1

1 Answers

1
votes

Don't think so. Not a Yii-restriction, rather how PHP and your webserver process a request.

Seems to be plenty of similar questions... here and here.