
30-11-2011, 21:05:15
|
| |
Merhabalar,
Kendi kişisle blogumda kullandığım bir hotlink yöntemim var. .htaccess ile bunu yapabilmek son derece kolay.
Aşağıdaki kod kendi blogumda kullandığım .htaccess dosyamın içeriği ile birebir aynıdır.
Subdomain içerisine atacaksın bu htaccess i.
aytacengin.com olan kısımları kendi site adresin ile değiştirebilirsin. Aşağıda listeli olan siteler izin verilen sitelerdir.
İzin verilmeyen sitelerde bulunan ve sana ait olan resimler,
İle yer değişir. Koruma resmi en alt satırda belirtilecek. Kendine bir koruma resmi oluşturursun. Alıntı:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
#Replace ?blog.aytacengin\.com/ with your blog url
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Options All -Indexes
ServerSignature Off
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://facebook.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://facebook.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://hotmail.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://hotmail.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://hotmail.com.tr/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://hotmail.com.tr$ [NC]
RewriteCond %{HTTP_REFERER} !^http://live.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://live.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://images.google.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://images.google.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://images.google.com.tr/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://images.google.com.tr$ [NC]
RewriteCond %{HTTP_REFERER} !^http://microsoft.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://microsoft.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://r10.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://r10.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://sn111w.snt111.mail.live.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://sn111w.snt111.mail.live.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://translate.google.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://translate.google.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://translate.google.com.tr/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://translate.google.com.tr$ [NC]
RewriteCond %{HTTP_REFERER} !^http://translate.googleusercontent.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://translate.googleusercontent.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://webcache.googleusercontent.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://webcache.googleusercontent.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.google.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.google.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.google.com.tr/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.google.com.tr$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.r10.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.r10.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.translate.google.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.translate.google.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.translate.google.com.tr/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.translate.google.com.tr$ [NC]
RewriteRule .*\.(jpg|jpeg|png|bmp)$ [R,NC] | Sevgiler,
Aytaç Engin |