Quantcast
Channel: Nginx Forum - Nginx Mailing List - Russian
Viewing all articles
Browse latest Browse all 3102

Редиректы с одной страницы на разные (2 replies)

$
0
0
Привет!

А каков правильный способ организации вот таких вот редиректов?

https://site.domain.com/static/html/help.html -> https://help.domain.com/helppage1
https://site.domain.com/static/html/help.html#WhatisSite? - -> https://help.domain.com/helppage2
https://site.domain.com/static/html/help.html#GettingStarted -> https://help.domain.com/helppage3

Слева - всегда "/static/html/help.html".

Если делать:

location = https://site.domain.com/static/html/help.html#GettingStarted {
return 301 https://help.domain.com/helppage3;
}

.. то понятное дело "#GettingStarted" съедается.

Выставлять кучу "if"-ов переменной $request_uri? Или есть более правильный способ?

--
s.

Viewing all articles
Browse latest Browse all 3102

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>