Prevent direct access to plugin folder
-
Hi There,
I am looking to prevent direct access to a plugin folder that cointains private documents and images. I only want users that are logged in to be able to view this folder contents. I have tried to achieve this by placing .htaccess inside that folder. However am having no joy, can anyone see where i am going wrong?
RewriteEngine On RewriteCond %{HTTP_REFERER} !^https://(www\.)?mywebsite\.com/ [NC] RewriteCond %{REQUEST_URI} !hotlink\.(gif|png|jpg|doc|xls|pdf|html|htm|xlsx|docx|mp4|mov) [NC] RewriteCond %{HTTP_COOKIE} !^.*wordpress_logged_in.*$ [NC] RewriteRule .*\.(gif|png|jpg|doc|xls|pdf|html|htm|xlsx|docx|mp4|mov)$ https://mywebsite.com/ [NC]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Prevent direct access to plugin folder’ is closed to new replies.