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
You need to use curl with a cookie that simulate a similar behavior in a browser.
When you visit google.com from England it redirects you to google.co.uk, however there is a link on that page titled "go to google.com" that lets you go back to google.com and stay there. It uses a cookie to remember your site preferences.
For example, here are the cookies that I have after doing this (using firefox):