How do I CURL www.google.com - it keeps redirecting me to .co.uk

前端 未结 7 2536
南笙
南笙 2021-02-19 16:06

I am using CURL to check for the existence of a URL (HEAD request) but when I test it with www.google.com, it redirects me to www.google.co.uk - probab

7条回答
  •  春和景丽
    2021-02-19 16:52

    You could use www.google.co.uk directly, no difference there. google.com/.net always redirect to your location but if you use a country TLD like .co.uk it will not redirect.

    There is no way (known to me) to prevent the redirect when using .com or .net.

提交回复
热议问题