Code to redirect links if domain is changed?

Discussion in 'HTML & JavaScript' started by jamesyboy, Jan 25, 2014.

  1. jamesyboy

    jamesyboy Regular Member

    Apr 4, 2011
    Likes Received:
    Searching for code that checks if the domain a page is hosted on matches the specified domain. If it doesn't links on the page are redirect somewhere else.

    Idea is that when someone steals my CPA landing pages and puts them on their server, the code will redirect to my offers.
  2. mypmmail

    mypmmail Junior Member

    Jan 31, 2008
    Likes Received:
    I don't think this is possible as whoever that put your page on their server, it become theirs.

    Moreover, they are not likely to "steal" your logic wholesale.
    They can "steal" your graphical presentation (html) of your landing page, but not any php logic coded.

    Thus, if they "steal" your html, they would have to change the affiliate link to theirs.
    If they are not savy enough to change the affiliate link, then it's still your affiliate link. :)
    But, if they do, it's already out of your control.

    Hope that explains.