Slightly technical question regarding mod_rewrite hotlink protection

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • badmrfrosty
    Confirmed User
    • May 2003
    • 500

    #1

    Slightly technical question regarding mod_rewrite hotlink protection

    Hi, i'm wondering if you guys are using mod_rewrite to hotlink protect your servers or if you noticed that it causes more problems than it is worth? I recently started using it and i've read that it can cause certain browsers issues/etc.

    Does anyone have any real world input on this?

    Thanks,
    BMF
  • disregard
    Confirmed User
    • May 2004
    • 118

    #2
    The amount of problems it causes depends on what rules you use. The deal is that browsers aren't guaranteed to provide referrers so some rulesets will not let those browsers see your images. In real life, your audience has browsers that work fine with normal hotlink rules.

    Make sure your rules are ok though.. some people have broken rules.
    house o' fart

    Comment

    • Slap Dot
      Confirmed User
      • Aug 2004
      • 3168

      #3
      You mean .htaccess hotlink protection? That's not what Mod Rewrite is

      » AIM: slapdotted
      » Skype: slapdot
      » ICQ: 190444

      Comment

      • swedguy
        Confirmed User
        • Jan 2002
        • 7981

        #4
        Originally posted by Slap Dot
        You mean .htaccess hotlink protection? That's not what Mod Rewrite is
        mod_rewrite is used for regular image hotlink protection.


        I have mine set up to allow from my own domains + browsers that doesn't send a referer and I don't have any problems.

        Comment

        • disregard
          Confirmed User
          • May 2004
          • 118

          #5
          Originally posted by Slap Dot
          You mean .htaccess hotlink protection? That's not what Mod Rewrite is

          Actually, mod_rewrite usually is used for .htaccess hotlink protection. You plop a bunch of mod_rewrite rules in your .htaccess file typically. Like this: http://faq.ath.cx/index.php?query=a126.html
          Last edited by disregard; 02-05-2005, 11:32 AM.
          house o' fart

          Comment

          • badmrfrosty
            Confirmed User
            • May 2003
            • 500

            #6
            Below is my .htaccess

            RewriteEngine On
            RewriteCond %{HTTP_REFERER} !^http://(www\.)?pornacle\.com/ [NC]
            RewriteCond %{HTTP_REFERER} !^$
            RewriteRule \.(jpe?g|gif|bmp|png|mpeg|wmv|mpg)$ - [F]

            not sure if that looks ok? anyone have any pointers?

            Thanks

            Comment

            Working...