Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Aiheen aloitti: TimothyViets - syyskuu 09, 2011, 03:43:06 IP

Otsikko: User verification for Members only
Kirjoitti: TimothyViets - syyskuu 09, 2011, 03:43:06 IP
Hello,

I've built my site using SMF like a CMS to make a secure members only section.

Guests can browse some pages, but can't view others if they aren't logged in.

The problem I'm having is that I have some document folders that I want to protect.  I want to allow logged in users to view these files (pdf, doc, gif), but deny all guests from linking to them.

I've tinkered and tinkered and I'm not coming up with anything that works.  Either I block all access, or allow all access.  Any ideas?
Otsikko: Re: User verification for Members only
Kirjoitti: Illori - syyskuu 09, 2011, 03:46:37 IP
how are you hosting these files? are they attachments or what?
Otsikko: Re: User verification for Members only
Kirjoitti: TimothyViets - syyskuu 09, 2011, 03:49:41 IP
We are hosting these files. 

I have two root directories,

/PublicDocs/
/MemberDocs/

The public docs has the pdfs I want guests to be able to access

The member docs has the pdfs I only want logged in users to see.

They are not attached through the SMF system.
Otsikko: Re: User verification for Members only
Kirjoitti: Illori - syyskuu 09, 2011, 03:50:58 IP
if you host them though smf or a downloads type mod you can use smf permissions to manage them otherwise you would need to use some type of password protection on that directory and only allow your members access to that information, but they can easily share that with others.
Otsikko: Re: User verification for Members only
Kirjoitti: TimothyViets - syyskuu 09, 2011, 03:53:30 IP
Is there anyway to get a htaccess to pull the user_is_logged from SMF?
Otsikko: Re: User verification for Members only
Kirjoitti: Illori - syyskuu 09, 2011, 05:31:09 IP
no as .htaccess does not connect to php as far as i know.