Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Detecting entry url

Reply
Thread Tools

Detecting entry url

 
 
Robert Mark Bram
Guest
Posts: n/a
 
      02-29-2004
Howdy All!

Let's say I have a single web page.. but bought three different domains, all
of which point to it.
So I can type
rob.com.au
or
robert.com.au
or
robertbram.com.au
and they will come to my page 'rob.htm'

Is there a way for to determine which url the user came from?

Thanks for any advice!

Rob



 
Reply With Quote
 
 
 
 
David Dorward
Guest
Posts: n/a
 
      02-29-2004
"Robert Mark Bram" <none> wrote:
> Let's say I have a single web page.. but bought three different domains,
> all of which point to it.


Domains do not point to pages, they point to servers. You might have a
domain pointing to a server with some form of client side redirect on it.

> Is there a way for to determine which url the user came from?


In the redirect scenario? No, not with any degree of reliability. HTTP
includes the referer[sic] header which user agents may use to send the URI
of the previously visited resource, however this is optional, and often
spoofed. (Unfortunately, the (standard violating) spoofing is on the
increase thanks to certain 'privacy protecting' personal firewall
products[1]).

If you had three domains pointing at the same server (and not the redirect
scenario your question suggests) then it is a trivial matter in most server
side environments to read the requested domain, you could even do it in
client side JavaScript (although client side scripting is unreliable and
shouldn't be depended upon for anything mission critical). The specifics
depend on the language you choose.

[1] If they want to hide the referer, why don't they just not send it?
Putting false data there is not helpful!

--
David Dorward <http://dorward.me.uk/>
 
Reply With Quote
 
 
 
 
William Tasso
Guest
Posts: n/a
 
      02-29-2004
Robert Mark Bram wrote:
>
> Let's say I have a single web page.. but bought three different
> domains, all of which point to it.
> ...
> Is there a way for to determine which url the user came from?


yes - your server scripting engine will have the necessary functionality to
tell you the url of the current script.

--
William Tasso


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Redirect url if invalid entry into URL teser3@hotmail.com Java 0 05-18-2007 02:12 AM
Allowing entry of a Carriage Return during data entry Mike Owen ASP .Net Web Controls 3 07-27-2006 02:34 PM
Form field entry directs to diff URLs based on entry? AtomicBob HTML 14 05-02-2006 07:07 AM
Form entry to Time part of database Date entry? Noozer Javascript 2 08-01-2005 08:10 PM
Detecting ID of just written DB entry ! Jake ASP General 3 09-25-2003 10:57 AM



Advertisments