I use a plugin in WPMU that encrypt all downloads urls in wp-content/uploads/ : The downloads can still be accessed if users know the path to the file: e.g. www.domain.com/wp-content/uploads/2013/02/file.pdf . My problem is how to prevent this . i want to restrict direct downloads from not encrypted urls

I tried this in my .htaccess but it disable downloads also from encrypted urls:

Deny From All
Allow From http://domain.com/wp-content/plugins/Encryptor-plugin/encrypt.php
  • To prevent browsing, just put an index.php file with the content <?php // Silence is golden ?> (or something like this) inside. As for the plugin, does it provide some GET/POST vars that you could check? Your current htaccess code does not work since A) you can't use a file (AFAIK) for a Deny/Allow From ... statement, B) the file is not where the request is coming from. – tfrommen Apr 17 '13 at 14:28
  • You can also alter Apache's configuration to prevent directory listing. – s_ha_dum Apr 17 '13 at 14:31
  • "directory listing" is not my problem, thank you anyway. – Ghinnersmee Apr 17 '13 at 14:37
  • "directory listing" was a part of your problem before you edited the question. – s_ha_dum Apr 17 '13 at 14:41
  • I fixed the question.thanks . how can enable only urls downloads generated by my plugin? – Ghinnersmee Apr 17 '13 at 14:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.