How to restrict access to files in directory to logged-in users only?
-
Hello!
We have a WordPress website on a shared SiteGround hosting server. We have files in a folder in our WP file directory (i.e. /wp-content/testfolder/test.html) that we’d like to prevent access to unless you are logged into our site. We are using UltimateMember to manage our gated pages and posts, but they do not offer a way to protect files in folders on the directory.
We tried the plugins “Prevent Files / Folder Access” and “Prevent Direct Access” but both of those require writing rules in the website’s Nginx config file on the server level which we do not have access to. We have also tried writing rules in the .htaccess file and those don’t seem to work.
Do we have any other options? Thank you in advance!
- The topic ‘How to restrict access to files in directory to logged-in users only?’ is closed to new replies.