Mod Rewrite-php include
From AMember Pro Manual
This plugin allow you add cookie-based login for protected content. Any kind of files (HTML, images, downloads, CGI scripts) can be protected, except complex PHP scripts. To protect complex PHP scripts use another method of protection.
Please note, it is always better to use new_rewrite protection method if possible.
Useful if:
- You wish to protect images, PDFs or other file.
Not useful if:
- Your server does not support mod_rewrite.
- You protect complex PHP scripts - this method will not work. You may use plain php_inlcude protection in this case.
[edit] Requirements
- mod_rewrite available from .htaccess files (see below)
- PHP compiled as an Apache module
See your hosting server information if you are unsure. Usually, any Cpanel-based hosting or dedicated server will work.
[edit] How does it work (for programmers only)
Apache's mod_rewrite process access to all pages/images/anything loading through aMember's file rewrite.php. This file checks the user's authorization in the database.
- If the user has an active subscription to the product or products then the protected content will be displayed.
- If the user is not authorized yet, or has an expired subscription, then the login form is displayed again with an error message.
