O
O
Oleg Titarenko2015-03-21 15:46:21
Yii
Oleg Titarenko, 2015-03-21 15:46:21

How to create a 301 redirect in Yii2?

How can I make such a focus
http://exemple.com/rename/get - старый сайт
on
http://exemple.com/get/view - новый сайт
PS The old site on OpenCart, after the transfer it will no longer exist, it's tedious to write a function in Yii. The question is how to do it correctly so as not to load the server ...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Valentin Saik, 2015-03-21
@ValentinSaik

On the old site, in the controller that processes your request, write:
Where 301 is the redirect code

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question