Community Support Forums — WordPress® ( Users Helping Users ) — 2011-11-15T17:14:19-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=15885 2011-11-15T17:14:19-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15885&p=53112#p53112 <![CDATA[Re: NextGEN Gallery and s2Member]]>
("For other users:

1. open notepad
2. copy and paste this code (user beware)
3. save file as .htaccess
4. upload to the directory with files that non-users should not download.)

Options -Indexes
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_COOKIE} !^.*wordpress_logged_in_.*$ [NC]
RewriteRule .* http://www.google.com/ [NC,L]

If a user is logged into wordpress they will have unfettered access to the files in the directory where this .htaccess file is located, including sub-directories. If the user is not logged into wordpress then they get sent to Google.com. ; )

This would also be useful for users that want to prevent Google from indexing their protected content. I noticed in another post you mentioned "filetype" searches presenting problems to some users. This should be helpful there.

Statistics: Posted by DominicWasserzug — November 15th, 2011, 5:14 pm


]]>
2011-11-15T00:23:37-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15885&p=52993#p52993 <![CDATA[Re: NextGEN Gallery and s2Member]]>
You can change the directory s2Member protects using this hack: viewtopic.php?f=4&t=2719#p8017

See if protecting the directory that the gallery uses does the trick and let me know, please.

I hope that helps. :)

Statistics: Posted by Cristián Lávaque — November 15th, 2011, 12:23 am


]]>
2011-11-12T20:48:58-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15885&p=52903#p52903 <![CDATA[NextGEN Gallery and s2Member]]>
This is what I understand thus far:

1. s2Member has a directory called 's2Member-files' that already has an .htaccess file that will only allow logged-in users to access the files through the URI restrictions.

2. This directory requires that you use a special link that goes through s2Member because only s2Member has access to those files.

This is the problem:

I already have NextGEN galleries in another folder that are not being protected. If I use the .htaccess language that is already available in the 's2Member-files' directory in the folder with my images it will not work because NextGEN will always point to the actual file location instead of the s2member? location.

The question is this:

Is it possible to tell NextGEN to dynamically trim the file folders from the url, except for the file name, and include the required s2member? syntax?

OR

Is it possible to have an .htaccess for URI restrictions that works the opposite way.

Ex. I access /s2Member-files/protected_file.zip (The real location).

.htaccess says, okay hold on let me check with s2Member to make sure that you have access to this file

Have s2member respond to the .htaccess file with 'yes' or 'no'

It seems that it would be optimal if the .htaccess file worked this way. If so, then we would not have to modify every other plugin to conform to the s2member linking structure.

I am not even sure if it is possible for an .htaccess file to do this. I am a novice developer. I know enough to get me into trouble and not enough to get me out. ; )

Thank you in advance for your response Jason.

Statistics: Posted by DominicWasserzug — November 12th, 2011, 8:48 pm


]]>