Quote:
Originally Posted by deathemperor
my site got bandwidth limit exceeded in Junly with 10GB bandwidth, now we have 50GB bandwidth, sometimes google spiders come over 200 spiders at a time. I ought to use the robots.txt file to prevent them not going to link that useless for searching and they can't access (like new thread or new reply). alos I use .htaccess file to prevent hot linking from other sites.
BTW: is there a way to prevent any file we want ? like .mp3, .wma,... files, I have a jukebox but I don't want other sites use my music files.
|
In your .htaccess file add the following code and change the site adress
Code:
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://.*ayyas\.com.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://.*ayyas\.com.*$ [NC]
RewriteCond %{REQUEST_URI} !^.*warning\.gif$ [NC]
RewriteRule ^.*\.(swf|bmp|gif|jpg|png|jpeg|avi|wmv|mpg|mpeg|wav|mp3|rar|zip|JPG|GIF|Jpg|RAR|ZIP|Rar|Zip])$ http://www.ayyas.com/images/warning.gif [NC,R,L]
I only allow warning.gif to be displayed in other sites. You can create your own warning gif.
Last two month was slow for my board and my traffic was around 2-2.25 gb per day.