Click to See Complete Forum and Search --> : Domain name blocking using htaccess syntax


508
09-19-2007, 02:55 PM
I am having problems with sites from a hosting company that are threating my site. I have htaccessed the sites, and I have htaccessed the hosting company. One thing I find suspicious is that almost every day or every two days a new site from the hosting company comes up during a search.

How can I improve on htaccess so I can go from

Deny site\.com
to
deny .com

My hosting company said it is possible to deny by extension, but could not explain the syntax. I did a search on the internet, and all it pulled up was IP blocking and domain blocking.

I believe with the format of deny .com, I will further protect my site from the new sites of tomorrow that are abusing my site.

What is the syntax?

Fang
09-20-2007, 04:48 AM
Deny from .xxx
http://httpd.apache.org/docs/trunk/mod/mod_access_compat.html

508
09-20-2007, 05:55 AM
I placed the extension next to the last number in the deny from with an actual number. It is now Deny from 1.2.3.4 .com. I know the 1.2.3.4 will be successful. Will this work for a .com or another extension?

Fang
09-20-2007, 06:43 AM
Should do, but it seems a little extreme to ban an extension.

508
09-20-2007, 04:01 PM
It is extreme, because it is necessary. If anyone at jupitermedia can understand me, Lee should. I sent Lee private e-mails about this scenario.

508
09-23-2007, 10:04 PM
I have now been assigned a new project to deny everyone in a specific city in the United States and a specific state.

They are different. The city I need to deny is not in the same state I need to deny.

What is the best way to start this?