Discussion in 'Installation/Configuration' started by Boon-Dog-Danny, Apr 8, 2008.

  1. Boon-Dog-Danny

    Boon-Dog-Danny New Member


    I have a site that uses lots of video.. example files being somefile.flv, somefile.wmv, somefile.asf

    I am trying to make it so only my website can use these files yet I cant seem to stop the video files using htaccess.. I was reading that changing this

    Order allow,deny
    Allow from all


    # Order allow,deny
    # Allow from all
    Order deny,allow
    Deny from all
    Allow from

    this could help .. my question is.. where do I change this?
    the etc/apache2/apache2.conf file?

    and how? do I use something like this?

    <FilesMatch "\.(wmv|asf|asx|swf)$">
    Order deny,allow
    Deny from all
    Allow from

    thanks for any help
  2. falko

    falko Super Moderator ISPConfig Developer

    You can put an .htaccess file like this into your video directory:

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)? [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)? [NC]
    RewriteRule \.(flv|wmv|asf)$ - [NC,F,L]
    This would block all requests that don't come from or or have an empty referer.
  3. Boon-Dog-Danny

    Boon-Dog-Danny New Member

    thanks Falco.. that seemed to do the rock!

Share This Page