I would have thought your rule would have caused an infinite loop, because once the bot was sent to /404.htm (as a new internal subrequest), it would match the rule again because it goes through mod_rewrite again (because it's a new subrequest), then it would be sent to /404.htm, and match again... It might have worked if you had done something like this:
- Code: Select all
# if it's not a reequest for /404.htm, send the bot to /404.htm
RewriteRule !^404\.htm$ /404.htm [L]
But it should have still blocked the bot with a 500 error after internally redirecting the maximum number of times.
It may also be that your server hasn't got FollowSymLinks on normally, and you needed to turn it on with:
- Code: Select all
Options +FollowSymLinks
Or something else.