Plugin Download-Monitor and 500 internal server error

The plugin Download Monitor has an option to use a custom download URL. This is done by a rewrite rule in the file .htaccess where WordPress is handling the permalinks. After changing the setting in the administration page of the plugin, you should resave your permalink structure in WordPress so it updates the .htaccess file. After doing that, it might happen that you receive a 500 internal server error.

If so, the solution is quite easy. Find the file .htaccess (which is hidden so you probably have to show hidden files in your FTP program) and remove the line:

Options +FollowSymLinks

After altering the file your website should be error free again and the downloads can be done by a neat url.

But, there is a little hidden error kept… If, for what reason you open the page for the permalink structure in your adminstration area, WordPress will instantly rewrite your .htaccess file. Not when you pressed a button or made a change, but just when the page shows up. And there the 500 internal error is again!

The error returns because the plugin is telling WordPress what to add to the permalink structure. In the file wp-download_monitor.php on line 3304 starts the text:

 $rule = ('
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^'.$offset.$dlm_url.'([^/]+)$ '.WP_PLUGIN_URL.'/download-monitor/download.php?id=$1 [L]
');

Remove the line with Options +FollowSymLinks and you can visit the page for the permalink structure again.

About the Author

Na een jarenlange ervaring in programmeren en webdesign wordt deze blog gevuld met artikelen die gerelateerd zijn aan internet. Daarnaast bij vlagen een column of een mooie foto.