Redirect referral link

Discussion in 'Javascript' started by Roland, Feb 24, 2004.

  1. Roland

    Roland Guest

    Hello,

    Is it possible to transfer a redirected link to a sub page on my website?

    Example:

    www.mydomain.com -----> Page with webhosting

    www.my2domain.com ----> directly points to www.mydomain.com

    When people come from my2domain.com the must be directly reffered to a
    subpage instead of the standard homepage.

    Note: The won't come there by pressing a link but are directly being
    directed by a domainpointer.

    Greetz Roland.
    Roland, Feb 24, 2004
    #1
    1. Advertising

  2. Roland

    Ivo Guest

    "Roland" <> wrote in message
    news:403b4bec$0$41753$...
    > Hello,
    >
    > Is it possible to transfer a redirected link to a sub page on my website?
    >
    > Example:
    >
    > www.mydomain.com -----> Page with webhosting
    >
    > www.my2domain.com ----> directly points to www.mydomain.com
    >
    > When people come from my2domain.com the must be directly reffered to a
    > subpage instead of the standard homepage.
    >
    > Note: The won't come there by pressing a link but are directly being
    > directed by a domainpointer.
    >
    > Greetz Roland.
    >


    Sure, just see what value is stored in the variable
    window.document.referrer. For example:
    if (document.referrer.indexOf('my2domain')>-1)
    location.replace('subpage.htm');
    If you can, you should do this on the serverside to minimize unnecessary
    webtraffic. Your users don't need to notice they are being rerouted.
    Also, the referer variable may be empty if they surf in from a javascripted
    link, or from their Favorites menu.
    HTH
    Ivo
    Ivo, Feb 24, 2004
    #2
    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. RickN

    graphic designer referral

    RickN, Nov 8, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    361
    RickN
    Nov 8, 2003
  2. Phil Certain
    Replies:
    3
    Views:
    5,811
    Phil Certain
    Jan 18, 2005
  3. Curt_C [MVP]

    COVAD Referral Program!

    Curt_C [MVP], Mar 2, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    1,233
    Kevin Spencer
    Mar 2, 2005
  4. Mark
    Replies:
    0
    Views:
    387
  5. Sal
    Replies:
    1
    Views:
    372
Loading...

Share This Page