W
W
wargych2019-05-19 17:20:05
Nginx
wargych, 2019-05-19 17:20:05

How to duplicate WordPress home page with different url?

Situation:
there is a self-written site not in php, on which there are several pages. Installed WordPress for the blogging part. As the main nginx web server.
Because the main page and a few more pages should remain old, then I hardcoded them in the nginx config via location = / . Accordingly, everything that does not fall on hard-coded locations is processed already on wordpress.
What is the question - I would like the main page of the wordpress theme to be available at some url, for example domain.ru/blog ; at the same time, other wp pages would not contain "/blog/" in their url, i.e. so that the address is domain.ru/example .
So far I see 3 alternative implementations:
1) redirect with url substitution at the nginx level (specify location in the part where requests to php are processed);
2) creating a duplicate of the main page using wp itself (not sure if it's possible);
3) move the wp root to the domain.ru/blog level in the wp admin panel, and then remove it from the /blog/ url in all other requests to the engine through nginx.
Actually, the question itself is which of the methods will be correct and how to implement it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2019-05-20
@wargych

why complicate it?
make an arbitrary page with such an address, then change the necessary links in the template so that they lead to it

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question