A
A
Artyom2016-06-21 05:19:31
Nginx
Artyom, 2016-06-21 05:19:31

What to register in the Nginx server settings to get it right?

Hello.
There is such a url:
сайт/store/show/товар
In the new version of the engine, the url became like this:
сайт/store/категория/товар.html
What code is needed in the server settings to redirect all pages from the old url to the new one, and there are ~ 1500 of them, by 301 redirects?
PS Is this even possible?
PPS Yandex and Google will essentially not respond to 301 redirects, right?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2016-06-21
@alexey-m-ukolov

The category is most likely dynamic and depends on the product. If so, then using nginx you will not be able to make such a redirect. You need to сайт/store/show/товарproxy all requests to a special handler inside your site, which will already determine the correct address for the redirect by the product code and return a 301 response.

Yandex and Google will essentially not respond to 301 redirects, right?
Of course, they will react, for this the redirect is done in particular. They will kick old pages out of the index and replace them with new ones ( Google Help ).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question