Hotlink protection - SWF files

Discussion in 'Apache' started by tressin, Jun 13, 2008.

  1. #1
    Hey, is there anyone that can help me fix up the code for hotlink protection for swf files?

    I'm currently using this in my .htaccess but it doesn't seem to protect SWF files, only images.

    RewriteEngine On
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(mysite).com [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.(mysite).com [NC]
    RewriteRule .*.(swf|jpg|gif|png)$ - [NC,F]


    I'm a complete beginner with this kind of stuff, so sorry if this is posted in the wrong section :confused:
    Or, if anyone could tell me another way besides using .htaccess, that would be appreciated :)
     
    tressin, Jun 13, 2008 IP
  2. Roy Maurice

    Roy Maurice Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try this one

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} .
    RewriteCond %{HTTP_REFERER} !mydomain\.co\.uk$
    RewriteRule \.(swf)$ - [F]
     
    Roy Maurice, Jan 6, 2010 IP