This is most likely caused because Download Monitor uploads it’s files to a protected directory. Make sure your downloads don’t have Redirect to file checked or changed/delete the .htaccess file from the download monitor folder (/wp-content/uploads/dlm_uploads/
Hi Barry,
I hadn’t changed the .htaccess file in the dlm_uploads folder, but I still want to have files uploaded via this plugin set to redirect to the file. It seems like the deny from all .htaccess rule is always present, and is always breaking the redirect functionality.
My suggestion:
Have it so the .htaccess file in dlm_uploads only adds deny from all when Download Monitor settings have “Prevent Hotlinking” enabled, and have it remove that line when that setting is disabled. This would have the plugin act how you’d expect while letting redirect to file work with files uploaded via the plugin.
Going the extra mile might be disabling the “Redirect to file” checkbox when “Prevent Hotlinking” is enabled with a notice mentioning why this can’t be used.
That said, you might have a better workaround for serving redirected files that were uploaded via the plugin.
Thank you for the great plugin!
Hey KZeni,
For now we’ll always leave the dlm_uploads directory protected the way we’re currently doing it. We’re protecting the directory via .htaccess which kicks in before PHP does, making it immune to almost all possible PHP backdoors or security vulnerabilities.
I understand it can be annoying to run into issues when you’re directly linking to a file in a protected directory but I rather help the people that run into this than having to help people that have had direct access on files that were meant to be protected.
Thank you for understanding.
Kind Regards,
Barry Kooij