PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Protecting content on a different domain?

s2Member Plugin. A Membership plugin for WordPress®.

Protecting content on a different domain?

Postby mackey » September 8th, 2010, 2:07 pm

Long story short, our site is hosted on 1 domain, while our media is hosted on another. Is it possible to protect our media so only Level2 members can download it?

I looked into multi-site configs but it looked like that was only subdomains. I'm running the latest version of wordpress and s2member pro.

Thanks for your help.
User avatar
mackey
Registered User
Registered User
 
Posts: 11
Joined: August 9, 2010

Re: Protecting content on a different domain?

Postby Jason Caldwell » September 9th, 2010, 11:14 am

Hi there. Thanks for the excellent question.

The short answer is no. You'll need to have all of your protected files inside the /plugins/s2member-files/ directory so that s2Member knows where they are and can protect them from public access.

The long answer is yes, but it depends on where the media is actually hosted
( i.e. externally, or actually on the same server, just under a different domain ).

----------------------------------------

If your media is located on the same server, just under a different domain:
- create a symlink inside the /plugins/s2member-files/ directory that points to the actual location.

From a Unix command line, type in something like this:
Code: Select all
ln -s /actual/path/to/your/files /path/to/plugins/s2member-files/symlink

So now your download links would all look like this:
Code: Select all
http://www.example.com/?s2member_file_download=symlink/file.zip

* NOTE: you will STILL need to protect the real location of your files, by placing an .htaccess inside the real directory they reside in. Just create an empty file named ".htaccess" and put in one line that says:
Code: Select all
deny from all


----------------------------------------

If your media is hosted externally ( on a different server entirely ), then you could look into drive mapping, perhaps using an NFS, which would allow you to map a specific sub-folder on another server over to the /plugins/s2member-files/ directory on your actual site.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA


Return to s2Member Plugin

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron