.htaccess config problem

admin

Administrator
Staff member
I wish to stop hot linking to my MIDI files.
I want people to be able to Download /play the files when they are at my page but not when the hot link from another server.

However, the way I have it configed now, it stopps everyone. What do I need to change?

This is how the .htaccess file currently reads:

< - - - snip - - - >

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://apassion4jazz.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.apassion4jazz.net/.*$ [NC]
RewriteRule .*\.mid$ - [G]

< - - - snip - - - >

Much appreciated,Actually, I think that code would work - but I just found out that my server has the "group" permission off, so any/all users must access with "world" and that is why I cannot rewrite the referrer.

Any ideas from anyone?If you can't block hotlinking using htaccess, try password protecting the folder the midi files are stored in. Post the name and password so folks can Download the files.

Regards,
KevinThanks Kevin, that's certainly one of the options but since these files are also used as background music for all 60 pages of the site, it would be a real chore for visitor to sign in on every page :)


[Edited by keyplyr on 03-22-2001 at 08:32 PM]Hi, I don't know a lot about this and I'm sure Jacob will correct me. but I think you add something like this.

RewriteCond %{REQUEST_URI} !/*mid$ [NC]

I hope this is of some help.
 
Top