| How to protect a web folder |
|
|
|
|
PHPMembers membership software is able to protect an entire web folder from being accessed by unauthorized visitors. To setup a protected web folder, click on Protect on the main menu, and then click on Protect Folder button. The admin folder is an example of web folder protection. When you install the system, the installation wizard creates a web folder protection for the admin folder. The protection settings only allow members of the admin group to access files in the folder. Unauthorized visitors are taken to the login page, with a parameter called “URL” which is the link they are going to be redirected to after their successful login to the system as members of the admin group. The URL parameter contains variable $1 which is the file name the visitor is trying to access. By default, the protection settings redirect unauthorized users to /login.php?url=/admin/$1. If a user try to access /admin/manage_users.php before he logs in as an administrator, he will be taken to /login.php?url=/admin/manage_users.php. Variable $1 is replaced by the file name 'manage_users.php' in this case. |




