Title: HTTP 500 error
Last modified: August 22, 2016

---

# HTTP 500 error

 *  [sabremary](https://wordpress.org/support/users/sabremary/)
 * (@sabremary)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/http-500-error-12/)
 * Lately, my site has been occasionally throwing HTTP 500 errors. Does this have
   something to do with the setting on the plugin that stops connections from fake
   user agents?
 * [https://wordpress.org/plugins/better-wp-security/](https://wordpress.org/plugins/better-wp-security/)

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

 *  [djeem59](https://wordpress.org/support/users/djeem59/)
 * (@djeem59)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/http-500-error-12/#post-5671056)
 * I have the same issue since the last update.
 *  [elper](https://wordpress.org/support/users/elper/)
 * (@elper)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/http-500-error-12/#post-5671114)
 * Same – In my case the .htaccess file was corrupt, as the blacklist was truncated–
   a quick but unsatisfactory solution is replacing the file with an older (working)
   one by FTP
 *     ```
       # BEGIN Ban Users
       		# Begin HackRepair.com Blacklist
       		RewriteEngine on
       		RewriteCond %{HTTP_USER_AGENT} ^Acunetix [NC,OR]
       		<snip apx 36 correct lines>
       		RewriteCond %{HTTP_USER_AGENT} ^Grafula [NC,OR]
       		RewriteCond %{HTTP_USE
       ```
   
 *  Thread Starter [sabremary](https://wordpress.org/support/users/sabremary/)
 * (@sabremary)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/http-500-error-12/#post-5671155)
 * Elper, thanks for the help. Do the plugin developers have any solutions?
 *  [dwinden](https://wordpress.org/support/users/dwinden/)
 * (@dwinden)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/http-500-error-12/#post-5671157)
 * There is a bug (actually 2) in the Ban Users “User Agents” part which prevents
   it from working properly when more than 1 banned “User Agent”
    is specified …
 * Not really relevant I think but still something worth to be aware of.
    When specifying
   multiple User Agents to be banned **ALL** RewriteCond lines in .htaccess end 
   with **[NC]** For example (Zeus and Apollo the User Agents to be banned) the 
   following RewriteCond lines are added to .htaccess:
 * RewriteCond %{HTTP_USER_AGENT} ^Zeus [NC]
    RewriteCond %{HTTP_USER_AGENT} ^Apollo[
   NC] …
 * while it should be:
 * RewriteCond %{HTTP_USER_AGENT} ^Zeus [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} 
   ^Apollo [NC] …
 * Also EVERY time you save Settings (and you have previously enabled “Ban Users”
   and you have specified >1 User Agents to be banned) an empty line is added to
   the banned User Agents list.
    This has currently no negative impact on the .htaccess,
   BUT when you fix the code for the first issue those empty lines will result into
   this:
 * RewriteCond %{HTTP_USER_AGENT} ^Zeus [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} 
   ^Apollo [NC,OR] …
 * Which makes the .htaccess invalid and will break your website …
 * The empty (User Agents) lines by the way are added by iTSec php code.
    When iTSec
   plugin reads the banned User Agents list from the database it adds a PHP_EOL 
   to the list EVERY TIME …
 * So when you fix issue 1 you also need to fix issue 2. After that it works perfectly(
   as long as you don’t add an empty line to the User Agents list yourself …).
 * dwinden
 *  Thread Starter [sabremary](https://wordpress.org/support/users/sabremary/)
 * (@sabremary)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/http-500-error-12/#post-5671159)
 * Dwinden, thanks for following up! That seems like a LOT of extra work!!!
 * Do the plugin developers have any plans to fix this anytime soon?

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

The topic ‘HTTP 500 error’ 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/)

## Tags

 * [500 error](https://wordpress.org/support/topic-tag/500-error/)
 * [user agents](https://wordpress.org/support/topic-tag/user-agents/)

 * 5 replies
 * 4 participants
 * Last reply from: [sabremary](https://wordpress.org/support/users/sabremary/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/http-500-error-12/#post-5671159)
 * Status: not resolved