hello 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 to # Order allow,deny # Allow from all Order deny,allow Deny from all Allow from 127.0.0.1 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 127.0.0.1 </FilesMatch> thanks for any help
You can put an .htaccess file like this into your video directory: Code: RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?myfirstsite.com [NC] RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?mysecondsite.net [NC] RewriteRule \.(flv|wmv|asf)$ - [NC,F,L] This would block all requests that don't come from myfirstsite.com or mysecondsite.net or have an empty referer.