latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

About: Danielle Brown

Sorry, I've not written a description yet. I'll get to it soon!


Topics I've Started

Viewing topic 1 (of 1 total)
Topic Count Last Reply
URI Restrictions Stopped Working

By:  Danielle Brown in: Community Forum

voices: 2
replies: 7

3 years, 6 months ago  Cristián Lávaque

Viewing topic 1 (of 1 total)

My Latest Replies (From Various Topics)

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Monday Jul 1st, 2013 at 8:19 pm #52849

If you want to protect the custom directory with .htaccess, you could try the original .htaccess from s2member-files, which will probably need customization too.

Yep, I already tried that and it didn’t work. I’m going to try to look at the htaccess again with a fresh look to see if I can figure out customizations to get it to work correctly, but I’m about ready to give up on this and just use the s2member file directory.

Posted: Friday Jun 28th, 2013 at 2:33 pm #52751

I tried different directories and files and wasn’t successful, but here’s one that should definitely work because it’s the standard media directory created by wordpress, and was the one that I did have working at one time:
(obviously I made the address anonymous with ####’s)

uri:
/wp-content/uploads/2013/06/

Code using the url, from the forum link in the last post:

<?php
   add_filter("ws_plugin__s2member_files_dir", "my_files_dir");
   function my_files_dir(){ return "/home/#######/public_html/#######/wp-content/uploads/2013/06/"; }
   ?>

The files I did get to be restricted at one time, were .jpg files.

Posted: Thursday Jun 27th, 2013 at 7:48 pm #52709

See these:
Dashboard -› s2Member® -› API / Scripting -› Custom Capability and Member Level Files

Great, I did miss the section for scripting sub-directories, so that solves that problem if we decide to use that.

The URI restriction will work with URLs served by WordPress. If you link directly to a file, even if it’s in a WP directory, the URI restriction won’t apply.

If the image in NextGEN Gallery is not served through WP, then the URI restriction won’t work on it. What you could do, though, if the NextGEN Gallery pages are served by WP, is to restrict access to the gallery itself.

Yes, I know that and stated that in the first post. I mentioned that I even tried using the standard wordpress media uploading to make sure it wasn’t due to NextGEN Gallery only, but the files were still not being protected. And it WAS working using the standard wordpress media uploading before installing NextGEN, which makes me wonder if it was NextGEN that screwed it up. I uninstalled NextGEN but the problem still remains.

See these:
http://www.primothemes.com/forums/viewtopic.php?f=36&t=2729&p=8018#p8018

Is that all I was supposed to do from the link above or am I supposed to be doing something with an htaccess file or something else as well? Like build an htaccess file in that directory perhaps? That code doesn’t do anything at all, it doesn’t protect anything (and I know I entered it correctly for the directory because when I enter an incorrect directory I get errors).

Viewing 3 replies - 1 through 3 (of 3 total)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.