Lifelesspeople.com

 Forum FAQsForum FAQs  KnowledgebaseKnowledgebase  RulesRules   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   HostingHosting   RegisterRegister 
 DonateDonate   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Block entire domain name  Share
Goto page 1, 2  Next
 
Lifelesspeople.com Forum Index -> Help Wanted
Post new topic   Reply to topic View previous topic :: View next topic  
Author Message
daman371
Lifeless Person


Joined: 14 Apr 2005
Posts: 1120


PostPosted: Tue Feb 17, 2009 7:55 pm    Post subject: Block entire domain name Reply with quote

How do I block an entire domain name using htaccess?
_________________
Daman371Designs
Sell Ad Space Auction Ads
Post Tutorials
Back to top
 
ClickFanatic
Est. 2005


Joined: 18 Jan 2005
Posts: 4685
Location: 37°45'18.24"N 14°59'42.9"E

PostPosted: Wed Feb 18, 2009 11:57 am    Post subject: Reply with quote

Your question is a bit ambiguous.
Do you want to block...
a domain (ie. hostname) from visiting your site?
all visitors on a certain domain?
a certain domain (ie. website) that links to content on your site?

Good news: all these things can be done using .htaccess. But you need to be slightly more specific with your question.
_________________
If you can read this, my post is on an alternating background.
Back to top
 
daman371
Lifeless Person


Joined: 14 Apr 2005
Posts: 1120


PostPosted: Fri Feb 20, 2009 12:04 am    Post subject: Reply with quote

I want to block a domain and all subdomains. I have found out there is another complication. The subdomains each have a different IP address. Say the domain is domain.com with IP = 100.30.41.54 and someone on a subdomain of that domain is test.domain.com with IP = 94.10.100.40. These hypothetical IP addresses. Well htaccess would block domain.com but not subdomain.com if I use deny from domain.com.
_________________
Daman371Designs
Sell Ad Space Auction Ads
Post Tutorials
Back to top
 
Jacky
3.14159265358979323846264


Joined: 01 Jan 2005
Posts: 4175


PostPosted: Sun Feb 22, 2009 11:49 am    Post subject: Reply with quote

I, like ClickFanatic, don't get what you are trying to do.
_________________
ClickFanatic wrote:
Your nonsense make my forum visits rather brief, Jacky. It's like:
"Hey look, a reply notification!"
*click* *click*
*reading garbage*
"Oh it was Jacky again..."
*close*
Back to top
 
daman371
Lifeless Person


Joined: 14 Apr 2005
Posts: 1120


PostPosted: Mon Feb 23, 2009 1:23 pm    Post subject: Reply with quote

I keep getting a bunch of web requests from bots at different IP but they are on the same domain. They are on different subdomains. I am also getting more bots now.
_________________
Daman371Designs
Sell Ad Space Auction Ads
Post Tutorials
Back to top
 
LP-SolidRaven
Evil Belgian Waffle


Joined: 06 Jun 2004
Posts: 8144
Location: Belgium

PostPosted: Mon Feb 23, 2009 3:15 pm    Post subject: Reply with quote

There are several ways to block a set of hostnames. Could you be more specific in how you wish to block them? Do you want to show a page why they were blocked or simply throw an error?
_________________
Dilly dally, shilly shally.
Back to top
 
daman371
Lifeless Person


Joined: 14 Apr 2005
Posts: 1120


PostPosted: Tue Feb 24, 2009 5:55 pm    Post subject: Reply with quote

Could you show both ways?
_________________
Daman371Designs
Sell Ad Space Auction Ads
Post Tutorials
Back to top
 
LP-SolidRaven
Evil Belgian Waffle


Joined: 06 Jun 2004
Posts: 8144
Location: Belgium

PostPosted: Wed Feb 25, 2009 3:49 am    Post subject: Reply with quote

Code:

order allow,deny
deny from rr.com
allow from all


You should be able to find the part to redirect to a page yourself I think as I posted something quite similar on the forum here before (though it was based on HTTP CLIENT instead of hostname Wink ).
_________________
Dilly dally, shilly shally.
Back to top
 
daman371
Lifeless Person


Joined: 14 Apr 2005
Posts: 1120


PostPosted: Thu Feb 26, 2009 4:06 pm    Post subject: Reply with quote

I have already tried that and it didn't work because they have different IP addresses. Would the following work better?

Code:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^ks[0-9]\.kimsufi\.com$
RewriteRule ^.* - [F,L]

_________________
Daman371Designs
Sell Ad Space Auction Ads
Post Tutorials
Back to top
 
LP-SolidRaven
Evil Belgian Waffle


Joined: 06 Jun 2004
Posts: 8144
Location: Belgium

PostPosted: Fri Feb 27, 2009 3:21 am    Post subject: Reply with quote

deny from rr.com should in theory block all the connections comming from roadrunner. You could try that though.
_________________
Dilly dally, shilly shally.
Back to top
 
daman371
Lifeless Person


Joined: 14 Apr 2005
Posts: 1120


PostPosted: Fri Feb 27, 2009 9:13 am    Post subject: Reply with quote

Would the rewrite method work?
_________________
Daman371Designs
Sell Ad Space Auction Ads
Post Tutorials
Back to top
 
LP-SolidRaven
Evil Belgian Waffle


Joined: 06 Jun 2004
Posts: 8144
Location: Belgium

PostPosted: Fri Feb 27, 2009 9:29 am    Post subject: Reply with quote

In theory it should work fine. Never really tried to block it that way to be honest.
_________________
Dilly dally, shilly shally.
Back to top
 
daman371
Lifeless Person


Joined: 14 Apr 2005
Posts: 1120


PostPosted: Fri Feb 27, 2009 12:24 pm    Post subject: Reply with quote

It seems the rewriterule is working like a charm.
_________________
Daman371Designs
Sell Ad Space Auction Ads
Post Tutorials
Back to top
 
jasper55
Novice Poster


Joined: 04 Mar 2009
Posts: 4


PostPosted: Wed Mar 04, 2009 2:06 pm    Post subject: Reply with quote

Hi from a newbie everyone!!!!!

Just wanted to give you my input on this.. HTACCESS is one way to go but the best way for blocking IP's in is your Cpanel or depending on what platform you are on using a module to block it..
Back to top
 
LP-SolidRaven
Evil Belgian Waffle


Joined: 06 Jun 2004
Posts: 8144
Location: Belgium

PostPosted: Wed Mar 04, 2009 3:13 pm    Post subject: Reply with quote

jasper55 wrote:
Hi from a newbie everyone!!!!!

Just wanted to give you my input on this.. HTACCESS is one way to go but the best way for blocking IP's in is your Cpanel or depending on what platform you are on using a module to block it..

And guess what cpanel does, it edits the .htaccess file(s)...
_________________
Dilly dally, shilly shally.
Back to top
 
Display posts from previous:   
Post new topic   Reply to topic    Lifelesspeople.com Forum Index -> Help Wanted All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Home | Hosting | News | Forum | Links | System Status | About | Archive | Donate ]
Powered by phpBB © 2001, 2002 phpBB Group
All trademarks and copyrights on this page are owned by their respective owners. Posts and comments are owned by the poster. Everything else © 2001 - 2007 Lifelesspeople.com