This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x
 Helicon Tech : ISAPI_Rewrite 2.x
Subject Topic: Block IP addresses Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
abhijeet_dighe
Newbie
Newbie


Joined: 20 January 2010
Online Status: Offline
Posts: 22
Posted: 20 January 2010 at 10:26pm | IP Logged Quote abhijeet_dighe

Hi

I am maintaining a black list of IP addresses in SQL Server database.

On my server I have many static HTML pages, which I don't want to be crawled. I have written proper robots.txt file for this. But still some crawlers dont follow it. I am using classic ASP.

How can I block access to my server / site, if certain IP from my black list hits the site?

 

 

Back to Top View abhijeet_dighe's Profile Search for other posts by abhijeet_dighe
 
abhijeet_dighe
Newbie
Newbie


Joined: 20 January 2010
Online Status: Offline
Posts: 22
Posted: 21 January 2010 at 5:08am | IP Logged Quote abhijeet_dighe

I have 2 questions:

1. Can I programatically update contents of .htaccess file using classic  ASP?

2. Can you give me content of sample .htaccess file for blocking two IP addresses?

 

 

Back to Top View abhijeet_dighe's Profile Search for other posts by abhijeet_dighe
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10520
Posted: 21 January 2010 at 6:12am | IP Logged Quote Anton

Please clarify whether you are using v2 or v3 of ISAPI_Rewrite.

If you are talking about .htaccess, I guess it's v3 you are uisng.
The example rule will be:

RewriteCond %{REMOTE_ADDR} ^(?:203\.20\.10.5|204\.30\.20\.10)$
RewriteRule .? - [F]

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
abhijeet_dighe
Newbie
Newbie


Joined: 20 January 2010
Online Status: Offline
Posts: 22
Posted: 21 January 2010 at 6:18am | IP Logged Quote abhijeet_dighe

 

I am using v3 of ISAPI_Rewrite.

Can I programatically update contents of .htaccess file using classic  ASP?

 

Back to Top View abhijeet_dighe's Profile Search for other posts by abhijeet_dighe
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10520
Posted: 21 January 2010 at 7:59am | IP Logged Quote Anton

Yes, you may edit .htaccess programatically like a simple text file.

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

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