Title: ModSecurity
Last modified: August 24, 2022

---

# ModSecurity

 *  [pickme](https://wordpress.org/support/users/pickme/)
 * (@pickme)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/modsecurity-4/)
 * Hi,
 * Renaming wp-admin creates modsecurity’s firewall issue. Is there a way to encode
   the custom code so the modsecurity regex will not catch it? There is a pattern
   match on what the Code Snippets sends to the server e.g. <\\\\?(?!xml\\\\s)
 * Thank you
    -  This topic was modified 3 years, 8 months ago by [pickme](https://wordpress.org/support/users/pickme/).

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

 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/modsecurity-4/#post-16036918)
 * Hi [@pickme](https://wordpress.org/support/users/pickme/),
 * I’m not entirely sure how mod_security handles catching custom code. If you’re
   able to whitelist the `wp-content/plugins/code-snippets` directory or `wp-admin/
   admin.php` (depending on whether mod_security works on a source or URL basis),
   then it should prevent it from catching snippet code.
 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/modsecurity-4/#post-16037648)
 * Hi [@pickme](https://wordpress.org/support/users/pickme/),
 * Looks like Victor has found a solution to this in another thread. Here’s the 
   link; hopefully it will work for you as well: [https://wordpress.org/support/topic/file-not-found-when-saving-snippets/](https://wordpress.org/support/topic/file-not-found-when-saving-snippets/)

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

The topic ‘ModSecurity’ is closed to new replies.

 * ![](https://ps.w.org/code-snippets/assets/icon.svg?rev=2148878)
 * [Code Snippets](https://wordpress.org/plugins/code-snippets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/code-snippets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/code-snippets/)
 * [Active Topics](https://wordpress.org/support/plugin/code-snippets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/code-snippets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/code-snippets/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * Last activity: [3 years, 7 months ago](https://wordpress.org/support/topic/modsecurity-4/#post-16037648)
 * Status: not a support question