Web Masters! Help me out with some code!

Discussion in 'OT Technology' started by sonicsuby, Apr 19, 2003.

  1. sonicsuby

    sonicsuby New Member

    Joined:
    Mar 15, 2000
    Messages:
    21,338
    Likes Received:
    0
    Location:
    CA
    I need some code / permission that if a link doesn't originate from within my domainitself, it will load a specific page on my site.

    I'm tired of people linking my pages without due credit. Anybody that can help me with this?

    Thanks.
     
  2. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    WOuldn't changing the 500 You do not have permission to view this page get the results you want?
     
  3. sonicsuby

    sonicsuby New Member

    Joined:
    Mar 15, 2000
    Messages:
    21,338
    Likes Received:
    0
    Location:
    CA
    The information should still be viewable. The point is to get credit to the site providing the info, not to the linking site.
     
  4. Astro

    Astro Code Monkey

    Joined:
    Mar 18, 2000
    Messages:
    2,047
    Likes Received:
    0
    Location:
    Cleveland Ohio
    In pseudo code:

    Get referrer URL from browser (not all browsers will give this up - what if its blank? could have been bookmarked)
    parse referrer URL and identify if it came from your server
    if it came from your server, then load the page normally
    if it came from somewhere else, do your extra stuff you need to do

    You'd need to do this for each page you want protect.
     
  5. druid

    druid What do the 5 fingers say?

    Joined:
    May 13, 2001
    Messages:
    702
    Likes Received:
    0
    I think i understand what you want to do, I dont know that you will be able to do it to effectivly with just some html code. You can however do it if you have access to edit your .htaccess file.
     

Share This Page