How can I tell the page I came from?

  • Thread starter Thread starter Mufasa
  • Start date Start date
M

Mufasa

I'm trying to know the page that I came from. If I use
page.request.urlreferrer it seems to only be filled in once I am on one of
the pages within my web site. I'd really like to know what page they came
from outside of the web site.

TIA - Jeff.
 
I'm trying to know the page that I came from. If I use
page.request.urlreferrer it seems to only be filled in once I am on one of
the pages within my web site. I'd really like to know what page they came
from outside of the web site.

TIA - Jeff.

Hmmm......dubious request Jeff!! I don't think it is (easily)
possible. Why would you want to know that? If I were a user I might
say that is absolutely none of your business!

O
 
OK then let's see if somebody can solve my problem.

We have a website that we use for documentation. Rather than have people
actually have to log in to it, I was going to set up links of some of our
other website ( where people already have logged in ) and use the place
where they came from to tell what they can see.

So if somebody went to public.xxx.com/docs - they could see a certain set
of files.
If they went to internal.xxx.com/docs - the could see a different set of
files.....

I would then put a redirect in the /docs that would all go to the same place
and it would figure out what your privileges are based on where you came
from. So everything would go to www.xxx.com.

I believe although I haven't tested it completely, that once you change
domains you lose your session variables. I supposed I could put it in the
query string but I don't particularly want it there because the users could
see it.

Any suggestions?

TIA - Jeff.
 
you should know the page where you came from :)

Just kidding.

There is no way except Request.UrlReferer.


Some advice here.

Do not use Request.UrlRefferer.
Use string sRef = Request.ServerVariables["HTTP_REFERER"];

Also always check it for null. Because a lot of AOL proxies do not pass
referrer.

Also if you get malformed referrer's URL the Request.UrlRefferer will throw
an exception when try to convert it to URI object.

George.
 
Also always check it for null. Because a lot of AOL proxies do not pass
referrer.

Not just AOL - more and more ISPs are filtering this out - you can't rely on
it at all...
 
OK then let's see if somebody can solve my problem.
We have a website that we use for documentation. Rather than have
people actually have to log in to it, I was going to set up links of
some of our other website ( where people already have logged in ) and
use the place where they came from to tell what they can see.

So if somebody went to public.xxx.com/docs - they could see a
certain set
of files.
If they went to internal.xxx.com/docs - the could see a different set
of
files.....

*if* those site really are named <something>.fixeddomain.com, you could
store a cookie with domain "fixeddomain.com". That way all those <something>
sites can receive that cookie.
From there it's up to you again ...

Hans Kesting
 
The problem is that if somebody types the address into the browser's address
bar and didn't get there by clicking on a link, there won't be anything there.
That's just the way HTTP works.
Peter
 
Mufasa said:
OK then let's see if somebody can solve my problem.

We have a website that we use for documentation. Rather than have people
actually have to log in to it, I was going to set up links of some of our
other website ( where people already have logged in ) and use the place
where they came from to tell what they can see.

So if somebody went to public.xxx.com/docs - they could see a certain
set of files.
If they went to internal.xxx.com/docs - the could see a different set of
files.....

I would then put a redirect in the /docs that would all go to the same
place and it would figure out what your privileges are based on where you
came from. So everything would go to www.xxx.com.

I believe although I haven't tested it completely, that once you change
domains you lose your session variables. I supposed I could put it in the
query string but I don't particularly want it there because the users
could see it.

Any suggestions?

TIA - Jeff.

OJ said:
Hmmm......dubious request Jeff!! I don't think it is (easily)
possible. Why would you want to know that? If I were a user I might
say that is absolutely none of your business!

O

]


[TROLL TIME FOR A SINGLE POST]
I think it's the public.XXX.com that OJ doesn't want you to KNOW!!!
Mythran

JK of course...
 
Back
Top