Terry: April 2007 Archives

咖啡八卦

| | Comments (0) | TrackBacks (0)

昏昏欲睡的下午 来一杯咖啡吧
没有搅拌棒也没关系
顺时针摇5圈 还能出现漂亮的八卦图形

DSC00406.JPG

超强的apache防盗链方法

| | Comments (0) | TrackBacks (0)

上周服务器重整,很多文件丢失了,真是郁闷。
因为站内有很多媒体文件,才一天不做防盗,流量就飙升了12G。看来不防不行了。
翻遍整个互联网终于找到了一个可行的办法,也是唯一有效的。

在网站根目录下放一个文件,文件名为 .htaccess
内容如下:

BrowserMatch "^RealPlayer" local_media=1
BrowserMatch "^MediaPlayer" local_media=1
BrowserMatch "^Windows-Media-Player" local_media=1
BrowserMatch "^NSPlayer" local_media=1
<FilesMatch "\.(wma|wmv|mp3|rm|asf)">
Order Deny,Allow
Deny from All
Allow from env=local_media
Allow from 127.0.0.1
</FilesMatch>

这样可以防止IE直接下载,而且只能在你站内的播放器收听哦,哇嘎嘎!

 

 

About this Archive

This page is a archive of recent entries written by Terry in April 2007.

Terry: May 2007 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 4.01