Htaccess - THE Ultimate .htaccess
Code:
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?askapache\.com/.*$ [NC]
RewriteRule \.(gif|jpg|swf|flv|png)$ http://www.askapache.com/feed.gif [R=302,L]
**opps*** you may have a MIME type issue? MPEG-4 Part 14 - Wikipedia, the free encyclopedia
This format is right but you will have to set paths and file types -- he missed JPG and jpeg JPEG if necessary? -- Apache is case sensitive if that has something to do with the pathing problem. Also, any space must be escaped %20... The UNIX rule for naming conventions should be followed if you don't want grief (been there done that before).
If the access is to be restricted in a certain directory, try putting the .htaccess in that directory. Apache reads the .htaccess in each directory in the path to the file's location when it will GET the file.