Detecting entry url

Discussion in 'HTML' started by Robert Mark Bram, Feb 29, 2004.

  1. 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
    :)
     
    Robert Mark Bram, Feb 29, 2004
    #1
    1. Advertising

  2. "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/>
     
    David Dorward, Feb 29, 2004
    #2
    1. Advertising

  3. 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
     
    William Tasso, Feb 29, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. AtomicBob
    Replies:
    14
    Views:
    898
    Toby Inkster
    May 2, 2006
  2. Replies:
    0
    Views:
    460
  3. Mike Owen

    Allowing entry of a Carriage Return during data entry

    Mike Owen, Jul 27, 2006, in forum: ASP .Net Web Controls
    Replies:
    3
    Views:
    715
    Alessandro Zifiglio
    Jul 27, 2006
  4. Jake
    Replies:
    3
    Views:
    138
  5. Noozer
    Replies:
    2
    Views:
    262
    Dr John Stockton
    Aug 1, 2005
Loading...

Share This Page