Please or Register to create posts and topics.

Link privacy to uploaded content

Hello,

We have a private membership site. I would like to know how to prevent links to uploaded content from being public. If you click on an uploaded file in the forum, then it will go to the link of the stored file. You can then copy that link and share it across the internet.

Thank you.

Mari

Hello @mari

To have a complete access-protection for the folder, you have to apply some kind of .htaccess protection-rules. You can read more about it here:

https://orbisius.com/blog/restrict-access-wordpress-uploads-folder-logged-users-p3662

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!

@asgaros – thank you very much.

# allow folder access only for special wp users (folders others then wp folders, like asgarosforum or your one)
# content of .htaccess in the special folder:

RewriteEngine On

RewriteCond %{HTTP_COOKIE} !^.*wordpress_logged_in_.*$
RewriteRule ^.*$ "-" [F]

RewriteCond %{HTTP_COOKIE} !^.*wcUserSettings.*$
RewriteRule ^.*$ "-" [F]

#access only allowed for wp username (example:user1, user3, user4)

RewriteCond %{HTTP_COOKIE} !^.*user1.*$
RewriteCond %{HTTP_COOKIE} !^.*user3.*$
RewriteCond %{HTTP_COOKIE} !^.*user4.*$

RewriteRule ^.*$ notallowed.shtml [L]

 

Content of notallowed.shtml something like this: NO <!–#echo var=”REMOTE_ADDR” –>

Asgaros has reacted to this post.
Asgaros