Is there anyway to add the HTTP Referer to the URL of a custom Umbraco 404 page? This is useful for finding out the page the visitor requested that caused the 404 error. It's also really useful in Google Analytics tracking for this reason, too.
Basically, what I'd like is the URL to contain the refferer. So, imagine a visitor types in:
Is this possible in Umbraco? Whenever I try and access HttpContext.Current.Request.UrlReferrer in an error page I get nothing. Same goes for document.referrer in javascript.
Adding/Accessing the Referrer to custom 404 Pages
Is there anyway to add the HTTP Referer to the URL of a custom Umbraco 404 page? This is useful for finding out the page the visitor requested that caused the 404 error. It's also really useful in Google Analytics tracking for this reason, too.
Basically, what I'd like is the URL to contain the refferer. So, imagine a visitor types in:
http://www.mysite.com/donkeys.aspx
However, the "donkeys" page has been deleted so they get redirected to my custom error page called NotFound:
http://www.mysite.com/notfound.aspx
What I'd like is for the "notfound.aspx" page to add in the referering URL as part of the query string like this:
http://www.mysite.com/notfound.aspx?referer=http%3A%2F%2Fwww.mysite.com%2Fdonkeys.aspx
Is this possible in Umbraco? Whenever I try and access HttpContext.Current.Request.UrlReferrer in an error page I get nothing. Same goes for document.referrer in javascript.
Bump! Anyone have an answer to this?
Thanks!
is working on a reply...