Page 1 of 1

MembersArea to protect links/files?

Posted: Wed 26. Feb 2014, 01:21
by Alexandre
Hello!
I wonder if there's a way to use a MembersArea plugin to protect not the whole pages, but some links, i.e. make them visible and downloadable (or simply to require a member's login to download files) only to members?
Currently I can create the page for with links for members and the same page for non-members, but if I know the link to the file, it may be downloaded from the site without logging in. So anti-leech generally is a concern.

Thanks.

Re: MembersArea to protect links/files?

Posted: Wed 26. Feb 2014, 08:23
by Gert
Alexandre wrote:I wonder if there's a way to use a MembersArea plugin to protect not the whole pages, but some links, i.e. make them visible and downloadable (or simply to require a member's login to download files) only to members?
No, MembersArea is just a Plugin to protect/hide the contents of CMSimple pages.
Alexandre wrote:... but if I know the link to the file, it may be downloaded from the site without logging in.
If you are allowed to use .htaccess, try to add a .htaccess file to the folder ./userfiles/downloads/ with following content:

Code: Select all

Order deny,allow
Deny from all
... and set the download link this way:

Code: Select all

./?download=filename.pdf
Direct access/download should be forbidden now, but the download link should work,
Gert

Re: MembersArea to protect links/files?

Posted: Sun 9. Mar 2014, 23:12
by Alexandre
Thanks for the reply.
I played with htaccess, but it didn't seem to work for me. Maybe I simply don't have the rules enabled on the web hosting.

I finally used a very weird combination of expand/collapse addon and protecteddownloads addon to hide the link - it actually does the trick - I create a subpage with a protected link, set it to be member-only accessible (using membersarea), then put and expand/collapse to a page which should contain the link - the expansion (and thus link visibility) is only available for logged in members :-)