Results 1 to 13 of 13

Thread: Blocking a website

  1. #1
    Dzinerbear
    Guest

    Blocking a website

    Hi all,

    I've got this fetish bulletin board linking to my site. They used to be hotlinking to some images until I plugged up some of those holes. This is a free porn kind of thing, so I doubt I'm getting anything from them in the way of sales.

    Can I block this site somehow with an htaccess file, or redirect every request from that site to a join page?

    Thanks
    Michael


  2. #2
    You do realize by 'gay' I mean a man who has sex with other men?
    Join Date
    Oct 2003
    Location
    New Orleans, Louisiana.
    Posts
    21,635
    Here ya go Michael

    # Options +FollowSymlinks
    RewriteEngine On
    RewriteCond %{HTTP_REFERER} ^http://(www\.)?domain.com *$ [OR]
    RewriteCond %{HTTP_REFERER} ^http://(www\.)?domain.net *$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http://(www\.)?domain.ca *$ [NC]
    RewriteRule \.*$ http://redirecturl.com [R,L]

    Regards,

    Lee


  3. #3
    Dzinerbear
    Guest
    Thanks Lee, man you're quick.

    I'm not a code kind of guy, so if I can ask a couple of questions.

    RewriteEngine On
    RewriteCond %{HTTP_REFERER} ^http://(www\.)?domain.com *$ [OR]
    RewriteCond %{HTTP_REFERER} ^http://(www\.)?domain.net *$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http://(www\.)?domain.ca *$ [NC]
    RewriteRule \.*$ http://redirecturl.com [R,L]

    So if I know the traffic's coming from a dot com do I just need the first line?

    And I'm assuming that I create whatever page I want to feed these people are call it redirecturl.com?

    Thanks
    Michael


  4. #4
    You do realize by 'gay' I mean a man who has sex with other men?
    Join Date
    Oct 2003
    Location
    New Orleans, Louisiana.
    Posts
    21,635
    Use this code Michael:

    RewriteEngine On
    RewriteCond %{HTTP_REFERER} ^http://(www\.)?theirurl.com *$ [OR]RewriteRule \.*$ http://redirecturl.com [R,L]

    That will take any traffic hitting your site from theirurl.com and send it to redirecturl.com

    Regards,

    Lee


  5. #5
    Hammer
    Guest
    If they're linking to your tour it doesn't matter if they have a free site or not, you'll still benefit. Hotlinking pisses me off, but if someone wants to send me free traffic I don't complain.


  6. #6
    Jason
    Guest
    wow Hammer...haven't seen you around here much lately...nice to see ya.


  7. #7
    Hammer
    Guest
    Thanks Jason. In addition to my normal workload I've been working very hard the last couple of months on a new product that took a lot of negotiating and baby sitting, but the baby has finally been delivered and I'm really excited about it. Now that the successful delivery had been accomplished I can get back to posting on some of the boards that I had to take a break from.


  8. #8
    Dzinerbear
    Guest

    RewriteEngine On
    RewriteCond %{HTTP_REFERER} ^http://(www\.)?theirurl.com *$ [OR]RewriteRule \.*$ http://redirecturl.com [R,L]

    That will take any traffic hitting your site from theirurl.com and send it to redirecturl.com

    [/B]
    Lee,

    I applied this code to my htaccess file and it doesn't seem to be working in that it doesn't redirect the traffic from the hotlinking site to the redirecturl.com; it does however provide the hotlinking site with broken images, which is fine for me.

    Any ideas, I'd really like to send the traffic to my own error.html page.

    Thanks
    Michael


  9. #9
    You do realize by 'gay' I mean a man who has sex with other men?
    Join Date
    Oct 2003
    Location
    New Orleans, Louisiana.
    Posts
    21,635
    For the redirect URL you might want to change it to an image call wto a graphic that has the URL of yoour site on it ill try and dig out the code that does work for you shortly dude

    Regards,

    Lee


  10. #10
    Dzinerbear
    Guest
    Hi all,

    When I place the following (as per Lee yesterday) in my htaccess file, I get the following Internal Server Error:

    RewriteEngine On
    RewriteCond %{HTTP_REFERER} ^http://(www\.)?club1069.topfong.com *$ [OR]
    RewriteRule \.*$ http://redirecturl.com [R,L]


    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    Please contact the server administrator, webmaster@universal-bear.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.

    When I take that portion of my htaccess file out, my site works again fine.

    Ideally, I'd just like to have a small image with my URL on it served up to the hotlinker rather than redirecting them somewhere.

    For now, I've taken those lines out of my htaccess file and the hotlinker is serving up my images again.

    Any ideas?
    Michael


  11. #11
    You do realize by 'gay' I mean a man who has sex with other men?
    Join Date
    Oct 2003
    Location
    New Orleans, Louisiana.
    Posts
    21,635
    Hmm...

    Okay first of all you should shoot an email across to your host and find out if they have any specific .htaccess rules that are not allowed on your server / account.

    Whilst you are waiting for a response you could try the following:

    RewriteEngine On
    RewriteCond %{HTTP_REFERER} ^http://www.club1069.topfong.com[OR]
    RewriteRule http://redirecturl.com [R,L]

    If that doesnt work see what the host says the problem is it may be something as simple as them having to allow all .htaccess rules

    Regards,

    Lee


  12. #12
    Dzinerbear
    Guest
    Hi Lee,

    I just put this up:

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?universal-bear.com(/)?.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?hunkhunter.com(/)?.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?mancheck.com(/)?.*$ [NC]
    RewriteRule .*\.(gif|jpg|jpeg|bmp)$ http://www.universal-bear.com/images...olen-image.jpg [R,NC]

    And it seems to be working and serves up a jpeg that says: "This images is stolen from ..."

    It doesn't seem to be affecting my site at all, but the problem is that I have to put this htaccess file inside every folder (gallery) on my site. If I put it in the root of my site, then of course it won't serve up the "stolen image" jpeg.

    What a pain in the ass this is.

    BTW, I found this site that has a form you can fill in and it will create the access file for you, very handy:

    http://www.htmlbasix.com/disablehotlinking.shtml


    Thanks for your help.
    Michael


  13. #13
    Moderator Bec's Avatar
    Join Date
    Nov 2003
    Location
    Ohio
    Posts
    8,419
    LOL I've been sending folk over to www.htmlbasix.com for quite a few nice generators ... thought you'd of fav saved that before now Michael!


Posting Permissions

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