Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    New to the CF scene
    Join Date
    May 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Can I block a website from linking to mine?

    So, I recently found out that a Porn site is linking to my website, which is not a porn site. It's a photography site that shows stock models but no nudity or even underwear is shown. I've gotten emails from men wanting to hire me as a photographer only to find out later that they were expecting me to take pictures of them doing naughty things with their wives or something like that and then I go...wait, let me guess you found my site through that porn site so you thought I shot Porn right? Yep. I've contacted the webmaster of the site several times. He does not respond, nor does he bother to remove the link. Is there some code I can use to deny anyone who clicks on the link on the porn site entry to my site?

  • #2
    Master Coder
    Join Date
    Apr 2003
    Location
    in my house
    Posts
    5,211
    Thanks
    39
    Thanked 201 Times in 197 Posts
    you could use htaccess I think to block access from specific urls. whether that is guaranteed to work, if they spoof their url, I don't know.

    welcome to CF btw.
    "The day you stop learning is the day you become obsolete"! - my late Dad.

    Why do some people say "I don't know for sure"? If they don't know for sure then, they don't know!
    Useful MySQL resource
    Useful MySQL link

  • #3
    Senior Coder
    Join Date
    Dec 2005
    Location
    Slovenia
    Posts
    1,959
    Thanks
    120
    Thanked 76 Times in 76 Posts

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Are you photos showing up on this other site or are they just linking to your site? You can stop them from linking to your site but you can stop the traffice from their site. You would stop the traffice from their site by using htaccess.
    Code:
    order allow,deny
    deny from xx.xx.xx.xx
    allow from all
    Where xx.xx.xx.xx is the IP address of the site in question that you want to block. Keep in mind this "could" block a legitimate request as someone could share the same ip address. If your photos are showing up on their site meaning they are hotlinking your photos then do a google search for how to prevent hotlinking with htaccess. You will get a lot of results.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #5
    New Coder
    Join Date
    May 2009
    Posts
    74
    Thanks
    0
    Thanked 7 Times in 7 Posts
    Quote Originally Posted by amanda12 View Post
    So, I recently found out that a Porn site is linking to my website, which is not a porn site. It's a photography site that shows stock models but no nudity or even underwear is shown. I've gotten emails from men wanting to hire me as a photographer only to find out later that they were expecting me to take pictures of them doing naughty things with their wives or something like that and then I go...wait, let me guess you found my site through that porn site so you thought I shot Porn right? Yep. I've contacted the webmaster of the site several times. He does not respond, nor does he bother to remove the link. Is there some code I can use to deny anyone who clicks on the link on the porn site entry to my site?


    Try using the code below in your .htaccess file. Here unwanted.com is your enemy domain.


    Default_Referer allow_referer
    Order_Referer deny_referer,allow_referer
    Deny_Referer from unwanted.com


    Hope this helps for you.


    Regards.

  • #6
    Regular Coder
    Join Date
    May 2008
    Location
    Oxford, UK
    Posts
    422
    Thanks
    14
    Thanked 27 Times in 27 Posts
    exaclty, you cannot remove the link from his site.

  • #7
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Right but you can block traffic from the site in hopes of people trying to contact you to do photography for them.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #8
    New Coder
    Join Date
    May 2009
    Location
    LA, USA
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Any chance to block a certain main domain, i.e. *.appspot.com. My awstats file gets messed up by all the fake links from appspot.com.

  • #9
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Using the method I posted you can block their ip address.

    Go here to get it: http://www.hcidata.info/host2ip.cgi
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •