Htaccess ile koruma nasıl yapılabilir?

Bu yazımızda .htaccess koruması hakkında bir bilgi vericek bir sitede yüksek server load ı bulunuyor ise loadları düşürmek için .htaccess kullanabilirsiniz, bunu nasıl mı yapıcaksınız? işte size bunun için hazırlanmış bir .htaccess dosyası.


RewriteEngine on
SetEnvIfNoCase User-Agent "^libwww-perl*" block_bad_bots
Deny from env=block_bad_bots
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP:VIA} !^$ [OR]
RewriteCond %{HTTP:FORWARDED} !^$ [OR]
RewriteCond %{HTTP:USERAGENT_VIA} !^$ [OR]
RewriteCond %{HTTP:X_FORWARDED_FOR} !^$ [OR]
RewriteCond %{HTTP:PROXY_CONNECTION} !^$ [OR]
RewriteCond %{HTTP:XPROXY_CONNECTION} !^$ [OR]
RewriteCond %{HTTP:HTTP_PC_REMOTE_ADDR} !^$ [OR]
RewriteCond %{HTTP:HTTP_CLIENT_IP} !^$
RewriteCond %{HTTP:FORWARDED-FOR} !^$ [OR]
RewriteCond %{HTTP:X-FORWARDED} !^$
RewriteCond %{HTTP_REFERER} !(.*)teklan.com.tr(.*)
RewriteCond %{HTTP_REFERER} !(.*)adsl.tpnet.pl(.*)
RewriteCond %{HTTP_REFERER} !(.*)weservit.nl(.*)
RewriteCond %{HTTP_REFERER} !(.*)asianet.co.th(.*)
RewriteCond %{HTTP_REFERER} !(.*)static.asianet.co.th(.*)
RewriteCond %{HTTP_REFERER} !(.*)static.asianet.co.th(.*)
RewriteCond %{HTTP_REFERER} !(.*)static.asianet.co.th(.*)
RewriteCond %{HTTP_REFERER} !(.*)static.asianet.co.th(.*)
RewriteRule ^(.*)$ — [F]

Burda vermiş olduğum ayar istenmeyen proxy kullanıcıları ve ziyaretçilerini siteden uzak tutmanıza yardımcı olur.