Request.UrlReferrer doesn't work

F

-=franz=-

do you have any ideas why this code doesn't work?
i have 2 pages in 2 different domains: a.html; b.aspx

a.html (i make a redirect)
_____
<script language='JavaScript1.2'>
function redirect(){window.location='http://www.xx.it/b.aspx';}
</script>
<BODY onload='redirect()'>
</body>
_____

b.aspx (i check to come from a.html)
_____
r1: Dim p As Uri = Request.UrlReferrer
r2: Dim ps As String = p.AbsoluteUri.ToString()
_____


i receive an error in row2 that say that the istance is not an object
(translating from italian (-; )
with debug i can see that already in row1 it doesn't find anything and "p"
stay ampty.

anybody knows what can i do?
i can't change the page a.html


thanks
franz from italy (again (-; )
 
J

Joerg Jooss

-=franz=- said:
do you have any ideas why this code doesn't work?
i have 2 pages in 2 different domains: a.html; b.aspx

a.html (i make a redirect)
_____
<script language='JavaScript1.2'>
function redirect(){window.location='http://www.xx.it/b.aspx';}
</script>
<BODY onload='redirect()'>
</body>
_____

b.aspx (i check to come from a.html)
_____
r1: Dim p As Uri = Request.UrlReferrer
r2: Dim ps As String = p.AbsoluteUri.ToString()
_____


i receive an error in row2 that say that the istance is not an object
(translating from italian (-; )
with debug i can see that already in row1 it doesn't find anything
and "p" stay ampty.

anybody knows what can i do?

There's no guarantee that you'll receive a referrer header, and upstream
proxies could change its values anyway.

Cheers,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top