Looking for a pro s2member developer

I am looking for an expert developer who has experience with hosting with wpengine(nginx)
My issue is that when linking directly to a protected file, the logged in user is redirected to the homepage of the site, instead of viewing/downloading the linked file.

Please comment here if you are able to help.

I’m not a developer with experience in WPengine or nginx, but my understanding is that this is expected behavior. Unless you are using some type of directory protection/passwords (which is rare) the server does not determine whether a user is logged in or not before serving up the file. (i.e. anyone hitting a direct link to your protected file will get it, or no-one will.)

For this reason, s2 blocks direct access to the files, and makes a shortcode [s2File /] (if I remember correctly) that you can use to allow file downloads – but I’ve never used it personally.

On my site, I opted to do something different and I built my own simple, two-part script to solve my problem. (I wanted to primarily hide the location/name of the original files & directories and I don’t know if s2 shortcodes do that.)

The first part of the script checks a users access capabilities (logged in, is allowed access to the file, etc.) and if so, it redirects to a second simple script that downloads the file. If a user doesn’t have access, it either stops, exits, or redirects to an upgrade page (I don’t remember which right now).

If you are handy with PHP, here is the StackOverflow question/answer that I had asked which includes some useful information.

Hope this helps.


Thanks Cam,
this used to work, linking from an email to an s2member protected file (either to the file located in the s2member folder in the plugins directory, or via the protected link url: ?s2member_file_download=) - if the user is logged in they will view / download the file. If not, they will be directed to the membership option page / login page. it is not working now, and I am looking for help in resolving this.


Maybe something in the config of your site changed to make it not work now.

If this wasn’t nginx, I’d suspect an htaccess change or something like that as a possible culprit. Do you know when the download’s stopped working, and if so, was it after any specific plugin or part of your site was updated?

Sorry I can’t be of more help. Hopefully someone else is available who is more knowledgeable in what you need.