Click to See Complete Forum and Search --> : Exceeded Bandwidth issues?


Miss Kaiba
08-30-2006, 05:58 AM
Hi Im hoping for some help/advice.
I have a small site that had just exceeded its monthy bandwidth. The site isnt very big at all so the only thing I can think of is people hotlinking and stealing my bandwidth.
My hosting company say they cant provide me with raw logs so I cant even see where the hotlinking is coming from to stop it?

Is there anything I can do to prevent hotlinking in the future like some file or code to put in my root directory?

Thanks heaps people!

pcthug
08-30-2006, 06:12 AM
If you're running on an Apache server, you may use .htaccess to stop hotlinking.

Open up Notepad and paste in the following code:
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?mysite\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|gif|bmp|png)$ - [F]
Replace the domain on line 1 with your domain (leave existing regex/escape characters in place)
Navigate to File > Save as... and change Save as type... to All Files and save with a File name of .htaccess
Upload to your root directory and test.

Miss Kaiba
08-30-2006, 06:31 AM
Thanks for that.
Oh Im not sure what kind of server im on? Sorry im a bit new to this.
I will try that file. How do I test it?

My site is down at the moment due to the bandwidth being exceeded.

pcthug
08-30-2006, 06:39 AM
Very high chance you on an Apache server, so when your account is reopened follow my previous steps. An easy way to test it is by viewing your page on a proxy server.

Miss Kaiba
08-30-2006, 06:47 AM
Ok I will do that as soon as my account is reopened :)
Thank you very much

Compguy Pete
08-31-2006, 07:00 PM
one thing I did in the past just as a quick work around was I changed the name of the directory where I stored my images.

Sure you may need to do it more often than I did but it will help for a short term fix, until you can get a more secure option in place.

Miss Kaiba
09-01-2006, 01:19 PM
Thanks for that compguy I was thinking that..
Just was hoping for a solution. The htaccess file doesnt work :confused:
I even went here to test my images and to generate more htaccess codes but still nothing
http://www.htmlbasix.com/disablehotlinking.shtml

Will it be beacuse my server doesnt handle htaccess? And is there another solution other than htaccess?

Thanks

Compguy Pete
09-01-2006, 05:55 PM
I know your host talked about not being able to get you raw logs but lets look at a couple other things you can do...

1. can your host do anything to enable a hotlink protection.
2. if you signed up for something like http://www.sitemeter.com/ it may tell you where your images are coming from. Also what images are people after.
3. why don't you post your sites web address anyways we may be able to backtrack the sites leeching form you, it's a bit of a long shot but something else to try.