My.diary.in.th
Currently viewing the tag: "hotlink"
เราสามารถป้องกันไม่ให้โดนขโมยใช้แบนด์วิทโดยใช้ Rewrite โดยเพิ่มข้อความต่อไปนี้ที่ไฟล์ .htaccess
ตัวอย่างนี้ป้องกันไม่ให้เว็บ test.com และ kapeek.com มา hotlink รูปภาพจากเรา
RewriteEngine On RewriteCond %{HTTP_REFERER} ^http://(.+.)?test.com/ [NC,OR] RewriteCond %{HTTP_REFERER} ^http://(.+.)?kapeek.com/ [NC] RewriteRule .*.(jpe?g|gif|bmp|png)$ – [F] ที่มา: http://altlab.com/htaccess_tutorial.html http://underscorebleach.net/jotsheet/2004/11/stop-image-hotlinking-tutorial-htaccess-apache
Tags
.htaccess Apache blogspot CentOS codeigniter CSS domain name driver Drupal Flickr Hotmail HTML internet law linux Mac OS X mailing list mailman MICT mod_rewrite monitor MSL MySQL name server Network PHP Postfix Security Smarty sony Spammail SPF theme TLS traffic log Universiade UTF-8 UTF8 vbulletin Wordpress การเมือง จตุคาม รูปภาพ สถิติ เรารักในหลวง
