Solved

HTTP-Redirect

Posted on 1998-03-08
10
245 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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
 

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
CSS Scroll Center with Static Side. Like EE does. 2 47
Regular Expression needed 4 44
Expanding/Collapsing Tree on SharePoint List 29 68
Insert PHP into HTML page. 7 53
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
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…

710 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