Protection Methods

From AMember Pro Manual

Jump to: navigation, search

Contents

Protection Basics

Essentially protection allows you to make one or more areas on your site available only for registered and not-expired customers. If you have protection set up correctly, only ACTIVE, that is paid and non-expired, customers will be able to access the protected area or areas.

You already know that aMember allows you to have several membership types ("products") each of which broadly equates to a protected area. aMember allows considerable flexibility in setting up protection for these areas.

For example, suppose you have 2 folders on your site:

  • /membersA/
  • /membersB/

and you have 3 products:

  • Product #1 - gives access to folder A
  • Product #2 - gives access to folder B
  • Product #3 - gives access to both folder A and folder B
 Please note: Products are always numbered. The id number is visible on the 
 aMember Admin CP -> Manage Products page. First id is not always equal to 1, 
 and second id is not always equal to first id increased by 1.

You can allow access as follows:

/membersA/ 
access allowed for members subscribed to products #1 OR #3
/membersB/ 
access allowed for members subscribed to products #2 OR #3

Setup Protection

To apply folder protection, just go to aMember CP -> Protect Folders and follow instructions.

Comparing Existing Protection Methods

Method HTML Login Form Logout ability Performace Access Log Requirements Notes
New_Rewrite + + + only login mod_rewrite available from .htaccess files most preffered method
Mod_Rewrite-php_include + + - full logs mod_rewrite available from .htaccess files, PHP compiled as Apache module this method may cause problems with third-party PHP scripts in protected area
PHP_Include + + + full logs only PHP files can be protected could not be used to protect images or downloadable content. You have to change your existing files
htpasswd - - + no logs no special requirements, will work on any Apache webhosting

Enabling Protection Plugins

php_include plugin is enabled by default, and you should not disable it. It is used for all protection methods except htpasswd.

To enable htpasswd plugin, follow instructions:

  1. Visit aMember CP -> Setup -> Plugins and enable htpasswd in Protection Plugins list.
  2. Click to aMember Cp -> Rebuild Db to build .htpasswd and .htgroup files in amember/data/ folder, else protection will not work until Midnight.