R
R
Ramil2016-04-30 16:23:02
PHP
Ramil, 2016-04-30 16:23:02

How to redirect a single request?

Hello.
The task is to replace the qwe.ru site packages, but only by certain links
For example, with qwe.ru/q/XXX/asd where XXX is a numeric variable, and the remaining paths are like qwe.ru, qwe.ru/asdasd Must accept requests from the original site qwe.ru I
wrote a selection of the necessary links, with these requests the result I need is given, in other cases a request is sent to the original site through CURL, and the request comes empty. Apparently due to the fact that redirection is registered in HOSTS. I tried to register the work of CURL through the left proxy server, still an empty result.
Has anyone faced this problem, how to solve it? maybe there is a ready-made software?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladislav, 2016-04-30
@click0

If you want to rob the site, then pass the correct cookies, sessions and user agent to curl.
If qwe.ru is your site, then you can build a new subdomain using nginx and the rewrite set.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question