htaccess antihotlinking question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Wolfy
    Confirmed User
    • Dec 2003
    • 3574

    #1

    htaccess antihotlinking question

    (I don't want to disable hotlinking completely.)

    You can block individual sites by using this:

    RewriteCond %{HTTP_REFERER} ^http://(.+\.)?site\.com/ [NC]

    such as:

    RewriteCond %{HTTP_REFERER} ^http://(.+\.)?fusker\.lv/ [NC]



    but what if I want to block every site that has the text "fusker" anywhere in the url? How do I do that?
  • Wolfy
    Confirmed User
    • Dec 2003
    • 3574

    #2
    come on, one of you knows this info. :D

    Comment

    • Wolfy
      Confirmed User
      • Dec 2003
      • 3574

      #3
      one of yous sales short solutions :D

      Comment

      • jonesonyou
        Confirmed User
        • Sep 2003
        • 3853

        #4
        did you ask google? I have no clue. good luck .

        Completely Real Amateur girls doing awesome things! Signup to promote Nebraskacoeds Today!

        Hit me up on ICQ/AIM 473324556/jasonnecoeds for exclusive content to promote with! And any ?'s

        Comment

        • Wolfy
          Confirmed User
          • Dec 2003
          • 3574

          #5
          +1 to your postcount though, good job! (thanks for the bump )

          Comment

          • footmonkey
            Confirmed User
            • Nov 2005
            • 639

            #6
            Originally posted by Wolfy
            (I don't want to disable hotlinking completely.)

            You can block individual sites by using this:

            RewriteCond %{HTTP_REFERER} ^http://(.+\.)?site\.com/ [NC]

            such as:

            RewriteCond %{HTTP_REFERER} ^http://(.+\.)?fusker\.lv/ [NC]



            but what if I want to block every site that has the text "fusker" anywhere in the url? How do I do that?
            Try this...
            RewriteCond %{HTTP_REFERER} !^www\.mysite\.com
            RewriteCond %{HTTP_REFERER} !^$

            1) says only allow referrers that are your own site
            2) says don't block if there's no referrer

            Hope it helps

            Comment

            • darksoul
              Confirmed User
              • Apr 2002
              • 4997

              #7
              Code:
              RewriteCond %{HTTP_REFERER} ^.*fusker.*$ [NC]
              1337 5y54|)m1n: 157717888
              BM-2cUBw4B2fgiYAfjkE7JvWaJMiUXD96n9tN
              Cambooth

              Comment

              • Wolfy
                Confirmed User
                • Dec 2003
                • 3574

                #8
                Originally posted by darksoul
                Code:
                RewriteCond %{HTTP_REFERER} ^.*fusker.*$ [NC]

                hmmm... just tried it, that didn't work for (example: http://www.milkonya.com/fusker/index.php?lid=36173)

                Comment

                • darksoul
                  Confirmed User
                  • Apr 2002
                  • 4997

                  #9
                  Originally posted by Wolfy
                  hmmm... just tried it, that didn't work for (example: http://www.milkonya.com/fusker/index.php?lid=36173)
                  I assume your .htaccess is complete ?
                  ie:
                  Code:
                  RewriteEngine On
                  RewriteCond %{HTTP_REFERER} ^.*fusker.*$ [NC]
                  RewriteRule .*\.(gif|jpg|png) - [F]
                  should work
                  1337 5y54|)m1n: 157717888
                  BM-2cUBw4B2fgiYAfjkE7JvWaJMiUXD96n9tN
                  Cambooth

                  Comment

                  • Wolfy
                    Confirmed User
                    • Dec 2003
                    • 3574

                    #10
                    Code:
                    RewriteEngine On
                    RewriteBase /
                    RewriteCond %{REQUEST_FILENAME} !-f
                    RewriteCond %{HTTP_REFERER} ^http://(.+\.)?forum\.phun\.org/ [NC,OR]
                    RewriteCond %{HTTP_REFERER} ^http://(.+\.)?sexonabanheira\.com/ [NC,OR]
                    RewriteCond %{HTTP_REFERER} ^http://(.+\.)?photos\.boobdex\.com/ [NC,OR]
                    RewriteCond %{HTTP_REFERER} ^http://(.+\.)?blogspot\.com/ [NC,OR]
                    RewriteCond %{HTTP_REFERER} ^http://(.+\.)?livejournal\.com/ [NC]
                    RewriteCond %{HTTP_REFERER} ^http://(.+\.)?roberc\.lv/ [NC]
                    RewriteCond %{HTTP_REFERER} ^http://(.+\.)?fuskerxp\.com/ [NC]
                    RewriteCond %{HTTP_REFERER} ^http://(.+\.)?midnitecrowproductions\.com/ [NC]
                    RewriteCond %{HTTP_REFERER} ^http://(.+\.)?fusker\.?/ [NC]
                    RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/nohotlink.jpe [L]

                    Comment

                    • darksoul
                      Confirmed User
                      • Apr 2002
                      • 4997

                      #11
                      oh,
                      all RewriteCond's except the last one need to have
                      [NC,OR]
                      1337 5y54|)m1n: 157717888
                      BM-2cUBw4B2fgiYAfjkE7JvWaJMiUXD96n9tN
                      Cambooth

                      Comment

                      • darksoul
                        Confirmed User
                        • Apr 2002
                        • 4997

                        #12
                        also the fusker rule needs another match-anything at the end
                        ^http://(.+\.)?fusker\..*$ [NC]
                        1337 5y54|)m1n: 157717888
                        BM-2cUBw4B2fgiYAfjkE7JvWaJMiUXD96n9tN
                        Cambooth

                        Comment

                        • Wolfy
                          Confirmed User
                          • Dec 2003
                          • 3574

                          #13
                          so...


                          Code:
                          RewriteEngine On
                          RewriteBase /
                          RewriteCond %{REQUEST_FILENAME} !-f
                          RewriteCond %{HTTP_REFERER} ^http://(.+\.)?forum\.phun\.org/ [NC,OR]
                          RewriteCond %{HTTP_REFERER} ^http://(.+\.)?sexonabanheira\.com/ [NC,OR]
                          RewriteCond %{HTTP_REFERER} ^http://(.+\.)?photos\.boobdex\.com/ [NC,OR]
                          RewriteCond %{HTTP_REFERER} ^http://(.+\.)?blogspot\.com/ [NC,OR]
                          RewriteCond %{HTTP_REFERER} ^http://(.+\.)?livejournal\.com/ [NC,OR]
                          RewriteCond %{HTTP_REFERER} ^http://(.+\.)?roberc\.lv/ [NC,OR]
                          RewriteCond %{HTTP_REFERER} ^http://(.+\.)?fuskerxp\.com/ [NC,OR]
                          RewriteCond %{HTTP_REFERER} ^http://(.+\.)?midnitecrowproductions\.com/ [NC,OR]
                          RewriteCond %{HTTP_REFERER} ^http://(.+\.)?fusker\..*$ [NC]
                          RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/nohotlink.jpe [L]
                          like that??

                          Comment

                          • darksoul
                            Confirmed User
                            • Apr 2002
                            • 4997

                            #14
                            yes,
                            and remove the first condition REQUEST_FILENAME ...
                            1337 5y54|)m1n: 157717888
                            BM-2cUBw4B2fgiYAfjkE7JvWaJMiUXD96n9tN
                            Cambooth

                            Comment

                            • Wolfy
                              Confirmed User
                              • Dec 2003
                              • 3574

                              #15
                              fuck, now it's disabled hotlinking completely.

                              Comment

                              • SCORE Ralph
                                Confirmed User
                                • Mar 2003
                                • 2090

                                #16
                                Originally posted by Wolfy
                                fuck, now it's disabled hotlinking completely.
                                lol... man i was going to see if i could help but it seems you already tried all I was going to mention.

                                GL
                                GetSCORECash.com | In the Biz Since 1991
                                Big Tits | Granny & MILFs | Amateurs | Big Booty | Foot Fetish | BBW | Teens
                                Hosted Embeds | MP4s | RSS Feeds | FHGs | Model Directory

                                Comment

                                • Wolfy
                                  Confirmed User
                                  • Dec 2003
                                  • 3574

                                  #17
                                  appreciate the bump just the same bro

                                  Comment

                                  • kimzar
                                    Confirmed User
                                    • Mar 2004
                                    • 1874

                                    #18
                                    bump!

                                    Comment

                                    Working...