PHP: Is there a way to change request address?

2019-07-04 01:36发布

For some reason, if I request a file using a url such as this:

http://localhost/proxy.php?url=http://anintranetsite/file.jpg

It works! I can get the file. But if I use,

http://127.0.0.1/proxy.php?url=http://anintranetsite/file.jpg

I cannot get it to work. I am not unnderstanding what is going on... Any thoughts on what could be going wrong?

Thanks

2条回答
成全新的幸福
2楼-- · 2019-07-04 02:22

Sounds like your browser has the proxy configured wrong.

Aka "No proxy for" should contain localhost AND 127.0.0.1

查看更多
倾城 Initia
3楼-- · 2019-07-04 02:40

sounds like a router/firewall problem. localhost is probably aliased to your machine name rather than 127.0.0.1

查看更多
登录 后发表回答