Ok I want to get the url in a string of the page that I am being redirected to when I go to a certain webpage.

Like lets say when I go to www.google.com, I instantly get redirected to www.google.ca, I want to have a string that is string location = "www.google.ca";

Any ideas?