Solved

HTTP-Redirect

Posted on 1998-03-08
10
226 Views
Last Modified: 2008-03-06
Hello,
is it possible to receive the original URL of an request which arrives at your web server via an HTTP-redirect?

Thanks!
Michael
0
Comment
Question by:mikel022697
  • 3
  • 2
  • 2
  • +3
10 Comments
 
LVL 5

Expert Comment

by:Christian_Wenz
ID: 1843391
using JavaScript, read out document.referrer

e.g. (somewhere in your page)

<SCRIPT LANGUAGE="JavaScript"><!--
  alert('You are coming from '+document.referrer)
//--> </SCRIPT>
0
 

Author Comment

by:mikel022697
ID: 1843392
This may work if someone clicked on a link but not if someone typed in a URL.
0
 
LVL 5

Expert Comment

by:Christian_Wenz
ID: 1843393
if one typed in an url, you might find previous documents in the history of the browser: just have a look at the history object.
0
 

Author Comment

by:mikel022697
ID: 1843394
Hello Christian,

as you can see at my original question, I asked for a possibility to receive the information on the serverside. On the serverside I can access the referer information but not the history information of the browser.
0
 
LVL 84

Expert Comment

by:ozo
ID: 1843395
I should hope not.  I may not want you to be able to see everywhere I've been.
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

Author Comment

by:mikel022697
ID: 1843396
Hello Ozo,
we don't want to log these informations anywhere, it's just necessary for our application running on the web server.
0
 
LVL 84

Expert Comment

by:ozo
ID: 1843397
You may not want to log it anywhere, but if there's a way for you to get the information out of my browser, then there's a way for others to do it too.
I'd prefer it to be my choice who I tell where I've been.

(if you only need to track people within your own application, couldn't you keep track on the application side?  Perhaps in combination with hidden fields set on the users page?)

0
 
LVL 8

Expert Comment

by:Kobe_Lenjou
ID: 1843398
The best thing you could do is use javascript to browse through the history of your visitors browser, save the collected data into a temporary cookie, and then have a server side Perl script to read this cookie.
And there is your data.
You could call the Perl script if someone is clicking a link (by example on your intro-page) so you will be shure you have the info.

Hey if you ever get this to work I wanne see it.
Greetz
0
 
LVL 1

Accepted Solution

by:
AsWas earned 200 total points
ID: 1843399
Here's how I get information like and beyond it!

http://www.extreme-dm.com/tracking/

This is a free tracker/counter you can add to a page and it compiles amazing amounts of information, especially considering it is free.  Since it gives you all website referrers (where they just came from), I assume it would recognise a redirect as the referrer.  I know when someone has typed in my URL because I get a referrer that makes no sense, like they came from the CNN site when my URL has no connection (no mention, no ads, nothing).  I have not seen a redirect listed, but as far as I know, there exists NO redirect for my home page.

If you'd like to see a sample of what the results look like (ie: the information it collects and how it presents the info to you, you can check out a sample counter [http://www.extreme-dm.com/tracking/sample/nph-summary.cgi?tag=example].

Try that!!
:) Debbie [http://www.aswas.com]
0
 
LVL 3

Expert Comment

by:percyn
ID: 1843400
The only thing that has the previous URL is the HTTP_REFERER environment variable. As you pointed out, this is only passed if someone has "pointed" to your site and not directly typed in the URL, but isisn' that what you are asking for ?

0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now