URI restriction for NextGen Galleries - NOT WORKING

I’m using s2member pro. I am also using NextGen gallery. I want to restrict all galleries. NextGen puts all galleries into a /gallery/ directory (domain.com/wp-content/gallery/…)

I’ve tried using /gallery/ as the restrictor, but when I bring up an image within /gallery/ it is not protected.


Where are you putting /gallery/ to set the restriction? In one of the URI Restriction boxes?

URI Restrictions - requiring Level #1 or greater.

I use that same format (not with NextGen, but with Events Manager at /events/ and also for /forums/) and it works fine.

Are you able to protect any content using any of the other options? e.g. can you restrict a post? To narrow it down to just being this part of the protection?

Could there be some caching getting in the way?

/events/ worked.
/gallery/ or /wp-content/gallery/ does not (this is the default for NextGen Pro

For instance … a test image https://ancalahoa.org/dev/wp-content/gallery/test/nalaIMG_4209.jpg should not come up for anyone without level 1 or higher access - but it does.)

Note: /dev is the wordpress installation for development, so that is considered the “base” url.

I just went to https://ancalahoa.org/dev/gallery/ and got redirected by s2member to create an account.

I suspect the redirection / protection may be working on the WordPress generated files, including the NextGen Galleries perhaps, but not on the jpgs themselves?

If that sounds right to you, I don’t think I’ve ever got into how s2member handles protecting individual images, but I think you want to look at the Download Options configuration.

I don’t want to have people DOWNLOAD images. I want the galleries to be visible to members (easy enough) and for no one to be able to hand a direct link to someone else of an image and allow them to see it. with the ability to access the individual images, it then leave it open for the images to be indexed.

This is a REQUIREMENT for anything that’s member based. Other membership programs have this built in. it’s hard enough to protect pdfs and media library with your plugin … and now I can’t protect images from a gallery? It makes the directory protection useless.


Also - I’ve tried moving the gallery into the s2member-files and it destroys the link of NextGen to upload images - so that doesn’t work.

I’m afraid I can’t help any further. I don’t work for s2Member, I am just a user with experience of it and was trying to help. Perhaps someone else will be able to assist further, or a different plugin may be a better option. In my experience as a developer, s2Member is normally only the best choice if you need some of its unique features. Otherwise, a different membership plugin is usually more user friendly and responsive. Good luck with finding a good solution.

But WP Sharks is the LISTED SUPPORT AGENT for S2Member. You guys ARE the support. There is no where else to turn.

You need to fix next gen or whatever to use s2member file folder. Simple as that. Maybe you can use a symlink. Place files into S2 folder then symlink them to the next gen expected location. This is your fault for not understanding how S2 works. But yeah S2 hasn’t got much of support