Sitemden fotoğraf çekilmesini önlemek
4
●413
- 24-11-2009, 16:43:14Çok fazla fotoğraf yayınladığım sitemde hosting trafik harcamamı azaltmak için bu fotoların başkalarınca çekilmesini nasıl önleyebilirim ?
- 24-11-2009, 16:47:52Hotlink koruması ile yapabilirsin. .htaccess'e ekle:
RewriteEngine on RewriteCond %{HTTP_REFERER} !^http://(www\.)?adres.com(/)?.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://(www\.)?adres.com(/)?.*$ [NC] RewriteRule .*\.(gif|jpg|jpeg|bmp|zip|avi|rar|mpeg|mpg|wmv|asf |mov|exe|pdf)$ http://www.adres.com/ [R,NC] - 24-11-2009, 16:49:38sitenizin.htaccess Açin ve En Altına Aşağıdaki Kodları Ekleyin
RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?domainin.com [NC] RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?images.google.com [NC] RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?translate.google.com [NC] RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?translate.googleusercontent.com [NC] RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?images.google.com.tr [NC] RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?bing.com [NC] RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?images.search.yahoo.com [NC] RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?images.yandex.ru [NC] RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?toleransdomain.com [NC] RewriteCond %{REQUEST_URI} !^/hataresmi.png [NC] RewriteRule .(gif|jpg|jpeg|png|swf)$ http://www.domainin.com/hataresmi.png [R,NC]
domainim.com = sitenizin domaini
toleransdomain.com = bir siteye tolerans sunabilirsiniz
hataresmi.gif gibi bir resim olusturun
" bu resim domain.com sitesinden calintidir eger orjinal resime ulasmak istiyorsaniz sitemizi ziyaret edin vs.. calintilari bu sekilde bir nevi engellemis olursun
Kolay gele - 24-11-2009, 20:46:25tşk.ler arkadaşlar.
sitemde htaccess dosyası göremedim ??
yukarıda 2 koddan hangi kodu uygulayayım ?
bir de hangi dizinde oluşturmam lazım htaccess dosyasını.
fotolar smf forum kısımımda oluyor.
yani httpdocs altına ana dizine mi yoksa httpdocs/forum altındaki dizine mi veya forumun tema klasörünün içine mi koymam lazım htaccess dosyasını ?