htaccess ???

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fusionx
    Confirmed User
    • Nov 2003
    • 4618

    #1

    htaccess ???

    My hotlink and redirect stuff is working fine.

    But, I'm seeing another fusker in my logs, and would LOVE to have a line in the .htaccess that returns a specific image IF a referring domain contains one of the following keywords:

    fusker, ripper

    BTW - the newest site to be trying to hit me is ripper.webrats.com

    I want to return goatse or tubgrl when they request pics.

    Anyone have that specific line of code?

    Maybe I'll make seperate entries and watermark the image "******* brought to you by ripper.webrats.com!", etc..

    I don't care about the bandwidth this costs me.

    TIA

    Last edited by fusionx; 10-26-2004, 08:41 AM.
  • WebHead
    Registered User
    • Oct 2004
    • 29

    #2
    Here's a nice little tutorial to help you out:
    http://www.javascriptkit.com/howto/htaccess7.shtml

    Hope that helps
    WebHead
    http://terminus.ath.cx
    Professional Graphic Design Web Development

    Comment

    • fusionx
      Confirmed User
      • Nov 2003
      • 4618

      #3
      Thanks WebHead

      That has the redirect part, but not the part that determines the specific referrer. I don't want to blast everyone with goatse - just a few specific assholes

      ok - bad choice of words there...

      Comment

      • WebHead
        Registered User
        • Oct 2004
        • 29

        #4
        Oh ok, so you just need basically an "If, then Else" statement added to do that. drudged around and found this easy to follow tutorial for you to explain how to accomplish just that. Will be a bit of reading, but they have great examples and you will get the idea. It will basically tell the .htaccess file that is XXX hits XXX then send it to XXX, otherwise everyone else goes to XXX, etc.

        http://www.vnwr.com/resources/tutorials/htaccess.html

        Hope that is more of what you are looking for.
        WebHead
        http://terminus.ath.cx
        Professional Graphic Design Web Development

        Comment

        • fusionx
          Confirmed User
          • Nov 2003
          • 4618

          #5
          I think you made my day

          It looks like I can use something like:

          PHP Code:
          RewriteCond %{HTTP_REFERER} ^http://ripper.webrats.com/.*$ [NC]
          ReWriteRule .*\.(jpg|gif)$ http://www.mydomain.com/hotlink/goatse4ripper.jpg    [F] 
          
          and it shouldn't redirect any other referrers to the specified image.

          I'll try it tonight and see what I can break
          Last edited by fusionx; 10-26-2004, 10:46 AM.

          Comment

          Working...