Protecting the upload file?
-
Hi, I have a bunch of PDF’s in wp-content/uploads/folders-files/. If a logged in user views the PDF, they can copy the link and share it with other to view while they are not logged in. I made an .htaccess file for the uploads folder but it always blocks all the files, even from logged in uses and admin.
I’ve tried but have WP Client membership plugin so not sure if that is the issue but it should not because even that login, logs you into wordpress itself.
RewriteCond %{REQUEST_FILENAME} ^.*(mp3|m4a|jpeg|jpg|gif|png|bmp|pdf|doc|docx|ppt|pptx|)$
RewriteCond %{HTTP_COOKIE} !^.*wordpress_logged_in.*$ [NC]
RewriteRule . – [R=403,L]Any other suggestions.
- The topic ‘Protecting the upload file?’ is closed to new replies.