P
P
Printip2016-12-09 14:38:20
linux
Printip, 2016-12-09 14:38:20

Proxying a site with the exception of one or more pages - how to implement it?

There is a site site.com and there is a domain site2.com It is
necessary that site2.com displays all the same information as on site.com except for the 1st page site.com/contact.html .
It is necessary that instead of this page, other information is displayed on the site2.com site.
Question: How can this be done?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
ky0, 2016-12-09
@ky0 Куратор тега Nginx

Делаете отдельные локейшены для страниц, которые проксировать не нужно и основной - для всего остального. Важно, чтобы у первых был более высокий приоритет, например, точное совпадение, а не префикс.

S
Stac, 2016-12-09
@Stac

I would do this (and I do this in a number of projects) at the application level.
The site itself can determine by which domain it was accessed.

echo $_SERVER["HTTP_HOST"];  //  покажет имя хоста, которое скорее всего будет совпадать с доменном.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question