Forum Moderators: coopster

Message Too Old, No Replies

How can a Yahoo! hosted site ban a foreign scraper?

Yahoo! does not allow .htaccess, how can an IP be blocked with Yahoo?

         

JS_Harris

12:53 pm on May 13, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



My Yahoo! hosted site is being repeatedly abused (hotlinked images etc) by the same person/site/network in Denmark. How can I block an IP without .htaccess? I've searched but found no suitable options in the control panel to deal with this problem.

DrDoc

6:36 pm on May 13, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Assuming that you are loading a preparsing script at the beginning of each file, you can easily block access to your site by blocking the IP in that script.

This does not solve the problem of hotlinking images, however. But, that should be easily addressed by contacting technical support. I am sure they have a way to handle this, even if not directly managable by you.

I assume you are 100% certain it is an Apache driven site?

httpwebwitch

6:56 pm on May 13, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



doing this without .htaccess is like having one hand tied behind your back... htaccess has wicked utilities for IP blocking AND including pre-processing scripts.

DrDoc is right - include() a script at the beginning of each page, look in the $_SERVER superglobal for the IP address, and compare it to a list of blacklisted IPs. If they are blacklisted, give them an empty response with a 401 HTTP status using the header() command.