Proteksi gambar lewat htaccess untuk save bandwidth

Proteksi gambar lewat file htaccess penting jika bandwith hosting Anda terkuras akibat gambar dalam situs Anda dipakai oleh server lain melalui website.

Proteksi

Proteksi gambar lewat file htaccess penting jika bandwith hosting Anda terkuras akibat gambar dalam situs Anda dipakai oleh server lain melalui website. Nah, kode berikut dapat Anda sisipkan untuk meminimalkan kehilangan bandwidth server Anda (save bandwidth).

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?domainanda.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ - [NC,F,L]

Baca juga tutorial lainnya tentang cara melindungi pencurian feed lewat .htaccess dalam tutorial Jevuska.

Author: Jevuska

Rachmanuddin Chair Yahya a.k.a Jevuska is the founder of Jevuska.Com, a qualified web about offering medical articles, blogging, tips, and tutorial of WordPress. Having written for Jevuska since 2007.

Leave a Reply

Your email address will not be published. Required fields are marked *

Use tag [php] to add code, e.g. [php]<?php echo $var; ?>[/php]