Title: Blocking Bad Bots Causes Redirect Loop on Apache
Last modified: February 12, 2020

---

# Blocking Bad Bots Causes Redirect Loop on Apache

 *  Resolved [jayharland](https://wordpress.org/support/users/jayharland/)
 * (@jayharland)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/blocking-bad-bots-causes-redirect-loop-on-apache/)
 * After enabling HackRepair.com blacklist and adding the bot “MJ12bot”, I started
   seeing the following error several times a day:
 * `AH00124: Request exceeded the limit of 10 internal redirects due to probable
   configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary.
   Use 'LogLevel debug' to get a backtrace.`
 * By comparing the error log with the access log, I was able to determine it was
   the blocked bot causing these errors.
 * After spending much time, I finally came across a thread where it was explained
   that the following line (right before # End HackRepair.com Blacklist):
 * `RewriteRule ^.* - [F,L]`
 * Redirects everything to forbidden, even the 403.html error page it’s redirected
   to! This results in an infinite loop.
 * To resolve this, I replaced that line with this:
 * `RewriteRule !^error - [F,L]`
 * Telling it to redirect everything except my error directory.
 * This was a headache for me. Hopefully this helps someone else!

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [jayharland](https://wordpress.org/support/users/jayharland/)
 * (@jayharland)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/blocking-bad-bots-causes-redirect-loop-on-apache/#post-12432613)
 * To follow up, iThemes overwrote my modification of course, which I didn’t consider.
   What I ended up doing was copying HackRepair.com’s blacklist, disabling it in
   iThemes and manually adding it to my .htaccess with the modification.
 *  [beardedginger](https://wordpress.org/support/users/beardedginger/)
 * (@beardedginger)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/blocking-bad-bots-causes-redirect-loop-on-apache/#post-12446437)
 * Hi,
 * For clarification, did disabling the HackRepair.com’s Blacklist and adding the
   info to the .htaccess file resolve your issue?
 * Thanks,
 * Matt
 *  Thread Starter [jayharland](https://wordpress.org/support/users/jayharland/)
 * (@jayharland)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/blocking-bad-bots-causes-redirect-loop-on-apache/#post-12446576)
 * Yes, once I disabled the blacklist and added the info to the .htaccess file manually,
   it was no longer being overwritten. Thank you.
 *  Thread Starter [jayharland](https://wordpress.org/support/users/jayharland/)
 * (@jayharland)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/blocking-bad-bots-causes-redirect-loop-on-apache/#post-12500732)
 * Marking as resolved.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Blocking Bad Bots Causes Redirect Loop on Apache’ is closed to new replies.

 * ![](https://ps.w.org/better-wp-security/assets/icon.svg?rev=2980272)
 * [Solid Security – Password, Two Factor Authentication, and Brute Force Protection](https://wordpress.org/plugins/better-wp-security/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/better-wp-security/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/better-wp-security/)
 * [Active Topics](https://wordpress.org/support/plugin/better-wp-security/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/better-wp-security/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/better-wp-security/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [jayharland](https://wordpress.org/support/users/jayharland/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/blocking-bad-bots-causes-redirect-loop-on-apache/#post-12500732)
 * Status: resolved