473,808 Members | 2,851 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can I tell the page I came from?

I'm trying to know the page that I came from. If I use
page.request.ur lreferrer 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.
May 14 '07 #1
7 5112
OJ
On 14 May, 16:04, "Mufasa" <j...@nowhere.c omwrote:
I'm trying to know the page that I came from. If I use
page.request.ur lreferrer 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......dubio us 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

May 14 '07 #2
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.co m/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" <of****@gmail.c omwrote in message
news:11******** *************@y 80g2000hsf.goog legroups.com...
On 14 May, 16:04, "Mufasa" <j...@nowhere.c omwrote:
>I'm trying to know the page that I came from. If I use
page.request.u rlreferrer 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......dubio us 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

May 14 '07 #3
you should know the page where you came from :)

Just kidding.

There is no way except Request.UrlRefe rer.
Some advice here.

Do not use Request.UrlReff erer.
Use string sRef = Request.ServerV ariables["HTTP_REFER ER"];

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.UrlReff erer will throw
an exception when try to convert it to URI object.

George.


"Mufasa" <jb@nowhere.com wrote in message
news:uK******** ******@TK2MSFTN GP02.phx.gbl...
I'm trying to know the page that I came from. If I use
page.request.ur lreferrer 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.


May 14 '07 #4
"George Ter-Saakov" <gt****@cardone .comwrote in message
news:%2******** ********@TK2MSF TNGP06.phx.gbl. ..
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...
--
http://www.markrae.net

May 14 '07 #5
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.co m/docs - the could see a different set
of
files.....
*if* those site really are named <something>.fix eddomain.com, you could
store a cookie with domain "fixeddomain.co m". That way all those <something>
sites can receive that cookie.
From there it's up to you again ...

Hans Kesting
May 14 '07 #6
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

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Mufasa" wrote:
I'm trying to know the page that I came from. If I use
page.request.ur lreferrer 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.
May 15 '07 #7


"Mufasa" <jb@nowhere.com wrote in message
news:#D******** ******@TK2MSFTN GP03.phx.gbl...
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.co m/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" <of****@gmail.c omwrote in message
news:11******** *************@y 80g2000hsf.goog legroups.com...
>On 14 May, 16:04, "Mufasa" <j...@nowhere.c omwrote:
>>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......dubi ous 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...

May 15 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4746
by: qaz | last post by:
I have login links on a number of pages in my site. Some of the pages expect variables on the querystring. I want to be able to login from any of these pages. The login link redirects me to a login page. I want to go back to the page I came from and preserve the variables on the querystring. Can anyone give me a short script to have a user return to a calling page that preserves the querystring?
9
9378
by: Ian Richardson | last post by:
If I follow the steps on http://www.dhtmlcentral.com/tutorials/tutorials.asp?id=11 to add .js files to a document on demand, let's say by <body onload="blah();">, how can I reliably tell that it has been loaded? BTW, I'm doing this for several .js files (and I don't always know how many I'll be loading), so I need to check them all. If I code for IE, I can check all the document.scripts.readyState values (not being "uninitialized" or...
10
8916
by: pmelanso | last post by:
Hello, How can I tell if there is a page to go back to in the history or not??? Same with forward??? say something like/// if (there is a page to go back to ) { // DO something }else { }
1
1780
by: .Net Newbie | last post by:
I am relatively new to .Net and have been coding an intranet site for my employer for a couple of months. I am currently stuck coding in a text-editor called EditPlus without access to the VS.Net IDE, and coding pages with the script directly in each page (not using the codebehind method) as most of my learning material has demonstrated. I started with the IBuySpy Portal (SDK version not VS Version) as my base portal and have coded...
2
2584
by: Lauchlan M | last post by:
Hi. I'd like to put a button on my ASP.NET pages that sends them back to the previous page (as opposed to them having to use the browser back button). I can think of two ways to do this: (i) Use Javascript "window.history.back();" function (ii) Harcode the back button as a link button pointing to a page where I
3
1385
by: Amil | last post by:
I have a .aspx page that creates proprietary images (return type is image). Normally, calls to this .aspx page come from our own pages. I don't want someone to just type the URL for the .aspx image page (with modified query parameters)...I only want the .aspx page to work if it was called (embedded) from our own page. How can this be done? Can it be done without session variables? Is there an HTTP header or server variable that can be...
3
3135
by: Dan Sikorsky | last post by:
How can I get the Querystring passed to the Referring Page from its referrer? I don't want the querystring coming to my current page. I want the querystring that came to the referring page, so that I can check for the existance of a parameter value in that previous querystring.
0
1702
by: Sam | last post by:
I am fairly new to ASP. Net 2.0, background MS Access 2000/2003 and working knowledge of SQL 2000. Scenario: Page1: Blank Page loads with 2 Text Boxes (TxtLast, TxtFirst), a Command Button (CmdSearch) and a Gridview to Display result Data (4 Columns: Select but Text is: Show Details, Unique Record ID, Last Name and First
3
1331
prabunewindia
by: prabunewindia | last post by:
Hello everyone!, I developed a website page with IFrame. It was working fine. When a new modification came, I done some modification on the page called in iframe. before it was done in .Net 2003. I just added new validation controls. And nothing done in code.(it was builded and kept as dll) And i added one more iframe which is calling a page done in .Net 2005. Once I uploaded the new modified site, its got trojan virus and iframes where...
0
9721
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9600
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10628
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10373
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10113
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6880
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5547
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3859
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3011
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.