Solved

HTTP-Redirect

Posted on 1998-03-08
10
229 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

912 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

22 Experts available now in Live!

Get 1:1 Help Now