S
S
Sergey Beloventsev2016-08-16 22:16:58
Yii
Sergey Beloventsev, 2016-08-16 22:16:58

How to glue two addresses?

By creating separate rule classes now here is a query like this

Yii::$app->urlManager->createUrl(['/film/category/onefilm','id'=>$model->slug_film])

generates such an address,
http://film.lc/serials/serial-Druzba-narodov/
but if you type in the address bar like this
http://film.lc/serial/category/oneserial?id=serial-Druzba-narodov

then the transition will also take place on the same page as at this address
http://film.lc/serials/serial-Druzba-narodov/
, is it possible to glue it somehow so that the input in the address bar
`http://film.lc/serial/category/oneserial?id=serial-Druzba-narodov`
went to this address`http://film.lc/serials/serial-Druzba-narodov/`

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2016-08-18
@webinar

If the page is already indexed, turning it off will give a negative, so don't do it.
But there is a way out of this situation:
add

<link rel="canonical" href="http://www.example.com/blog"/>

https://support.google.com/webmasters/answer/13906...
https://yandex.ru/support/webmaster/controlling-ro... robot.txt
will also be useful in which to prohibit indexing of unnecessary pages
By the way, this should be done regardless of whether you have such a situation or not.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question