[Plugin: Private Files] Gives server error 500
-
Summary:
After files are protected all pages (Pages, Posts, Files, Admin, etc.) return a server error 500. Editing the .htaccess file fixes the 500 error (see below).What I did:
After installing and activating the plugin, I went to “Tools > Private Files” and selected “Protect” for any of the dropdown selections. A yellow update box said that files were protected, but all files were still accessible when not logged in. After selecting “Reprotect” the server gave 500 errors to any web page accessed.How I reversed the problem:
Since the plugin page says to remove the .htaccess file, I tried that first. This does fix the 500 error, but disables mod-rewrite and makes every Post (Posts and Pages) give a 404 error.To fully reverse problem, I added this back to the .htaccess file (it was taken from another WordPress install, and is pretty standard):
# BEGIN WordPress RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] # END WordPress
My thoughts:
It appears that two things happen:
1: The .htaccess file is written over improperly, removing a necessary rewrite rule.
2: The new .htaccess file assumes the proper file structure incorrectly. I.e., it adds “RewriteBase /wordpress/wp-content/uploads” which assumes the WordPress install will be in /wordpress/ which is not true in many (most?) cases.
- The topic ‘[Plugin: Private Files] Gives server error 500’ is closed to new replies.