Title: Prevent PHP exec in uploads causing error
Last modified: August 22, 2016

---

# Prevent PHP exec in uploads causing error

 *  [aaron_osteraas](https://wordpress.org/support/users/aaron_osteraas/)
 * (@aaron_osteraas)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/prevent-php-exec-in-uploads-causing-error/)
 * Hey,
 * This particular htaccess rule is preventing any resources with php in the URL
   from loading on the site, particularly images, eg: something-whatever-php.png
   would not load.
 *     ```
       # Rules to prevent php execution in uploads
                               RewriteRule ^(.*)/uploads/(.*).php(.?) - [F]
       ```
   
 * We’ve commented it out and it’s working, unsure how to fix it.
 * Thanks
 * [https://wordpress.org/plugins/better-wp-security/](https://wordpress.org/plugins/better-wp-security/)

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

 *  [iThemes Support](https://wordpress.org/support/users/ithemes-support/)
 * (@ithemes-support)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/prevent-php-exec-in-uploads-causing-error/#post-5383213)
 * Hey Aaron,
 * Thanks for reporting this. I’ll make sure and share it with the developer. For
   the time being you can comment it out or disable the “Disable PHP in Uploads”
   feature found in System Tweaks.
 * Thanks,
 * Gerroald
 *  [Thomas O.](https://wordpress.org/support/users/thomas-o/)
 * (@thomas-o)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/prevent-php-exec-in-uploads-causing-error/#post-5383223)
 * The problem has been reported before. See here for my explanation and fix:
    [https://wordpress.org/support/topic/please-fix-disable-php-in-uploads-issue-files-with-php-in-the-name-are-blocked?replies=7](https://wordpress.org/support/topic/please-fix-disable-php-in-uploads-issue-files-with-php-in-the-name-are-blocked?replies=7)

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

The topic ‘Prevent PHP exec in uploads causing error’ is closed to new replies.

 * ![](https://ps.w.org/better-wp-security/assets/icon.svg?rev=3529351)
 * [Kadence 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/)

 * 2 replies
 * 3 participants
 * Last reply from: [Thomas O.](https://wordpress.org/support/users/thomas-o/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/prevent-php-exec-in-uploads-causing-error/#post-5383223)
 * Status: not resolved