Good day. There is a page where there is no problem moving to it. The page opens. But it is worth asking it through curl - 404 answer. Everything is on the same server. If testing locally, there are no errors. But on the server a permanent error. The request itself:

$curl = curl_init('http://'.$_SERVER['HTTP_HOST'].'/parts/search/888'); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($curl); 

Which way to dig?

  • one
    Your page? can userAgent be worth registering - Naumov
  • Not. did not help - IK
  • Check if $_SERVER['HTTP_HOST'] returns what you need. - Alex Chermenin
  • Yes, returns. Even with the explicit indication of the address does not work - IK
  • Api, right? Maybe some headers are missing, or cookies. A 404 due to incorrect indication of the error code is forwarded, for example. - DanielOlivo

0