How To Redirect People When Coming With Reference

Discussion in 'JavaScript' started by extraspecial, Sep 25, 2012.

  1. #1
    Hello guys,

    Any idea how can I redirect people landing with a reference on the URL like the one below with JavaScript:

    www.website.com/?ref=12345

    I need to redirect it if the ref= is not empty or it there is ref on the URL.

    Thanks
     
    Last edited: Sep 25, 2012
    extraspecial, Sep 25, 2012 IP
  2. Fracisc

    Fracisc Well-Known Member

    Messages:
    3,670
    Likes Received:
    10
    Best Answers:
    1
    Trophy Points:
    195
    #2
    Fracisc, Sep 26, 2012 IP
  3. extraspecial

    extraspecial Member

    Messages:
    788
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    45
    #3
    Yeah, I can do that with PHP very easily, but the page is on html and I don't want to change it...

     
    extraspecial, Sep 26, 2012 IP