delphij's Chaos

选择chaos这个词是因为~~实在很难找到一个更合适的词来形容这儿了……

05 Apr 2004

Preventing stealing links

Some search engines has grabbed some of my links out (Primarily, MP3). So I put some limits there. This is because I don’t want FreeBSDChina to be a MP3 downloading site - It’s harmful for the server, and we don’t want it.

The code is the following, it’s simple and effective:


SetEnvIfNoCase Referer "^http://(blog|www)\.delphij\.net/" local_ref=1
<FilesMatch "\.(mp3|avi|wmv)">
	Order Allow,Deny
	Allow from env=local_ref
</FilesMatch>

Add it to the Apache configuration and everything goes away.