Clicky

Hi

Looking to trace the url path of a website request to see what redirects it encounters along the way(and some information about them if possible)

Using .net c#

Example would be www.wwwgoogle.com gets redirected to www.google.co.uk but would need to access that infomartion in code.

Stephen

asked 12/12/2011 09:53

stephenwilde's gravatar image

stephenwilde ♦♦


5 Answers:
have you tried Request.UrlReferrer ?
link

answered

gery128's gravatar image

gery128

Thanks for the link ;
"Then you'll be able to pull out the header and do the redirection manually by making a new request."

Do you please know the reference syntax for the url in the header to use ?
link

answered 2011-12-13 at 06:39:09

stephenwilde's gravatar image

stephenwilde

Use Fiddler proxy http://www.fiddler2.com/fiddler2/ to see raw traffic. Install this software. Run the proxy. It should automatically configure your browser. On the left column you will should have incoming traffic requests. On the right you will see tabs for different options you will be looking for "raw" click this and look for headers pertaining to redirects like " error 301 moving page " Location: http://newsitetraveltoo.com. This will show you the syntax. You can query for last page they came from using.
string referer = Request.ServerVariables["HTTP_REFERER"];
link

answered 2011-12-13 at 14:56:27

Russell_Venable's gravatar image

Russell_Venable

Thanks
link

answered 2011-12-14 at 08:20:28

stephenwilde's gravatar image

stephenwilde

Your answer
[hide preview]

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

×59
×156
×4
×10
×15

Asked: 12/12/2011 09:53

Seen: 482 times

Last updated: 12/14/2011 07:08