Override Global Rule

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 9
Joined: 09 Aug 2012, 11:24

Override Global Rule

09 Aug 2012, 11:31

I have a global rule to block a particular bot that causes problems on 99% of my websites. However, there is a single client, who in-turn has a client that uses this bot internally and they need to have access to their website. Is there a rule that I can put within this one site's .htaccess file to allow requests from this bot, but continue to block it for everyone else?

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Override Global Rule

09 Aug 2012, 11:47

Hello,

Create a section for this particular domain in http.conf using this directive - VirtualHost and duplicate your global rules there, excluding the block. In this case your domain will apply all rules minus one.

Regards
Andrew

User avatar
Posts: 9
Joined: 09 Aug 2012, 11:24

Re: Override Global Rule

09 Aug 2012, 12:10

Andrew,

I just tried that and the global rule is still being applied. Just to make sure that my virtualhost block was being picked up, I temporarily moved the blocking rule into my virtualhost block and it did block my request properly. However, when I have the blocking rule defined outside of the virtualhost block and not inside, the blocking rule is still blocking requests to that host when I access it.

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Override Global Rule

10 Aug 2012, 06:09

Maybe there's smth with www. or non-www... strange. Or you may try to move the virtualHost section on top of your config file...
Please, provide rewrite.log for the testing request. Logging issues described in FAQ

Regards
Andrew

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 4 guests