When I try to use curl
or file_get_contents
to read something like http://example.com/python/json/ from http://example.com/ I should be getting a JSON response, but instead I get a 404 error. Using curl or any other method outside my own domain works perfectly well.
echo file_get_contents('http://example.com/python/json/'); => 404
echo file_get_contents('http://google.com'); => OK
The same script works on my laptop, but I can't figure out what the difference is.