Single Username and Password Protection
The mgiAuthenticate and mgiAuthenticateDB tags password-protect individual pages of your web site. When a visitor accesses a page with an mgiAuthenticate or mgiAuthenticateDB tag, the web browser displays a dialogue box and prompts the user to enter a username and password. If the correct username and password are entered, the page displays. If either an incorrect username or password is entered, an error page displays.
Use the mgiAuthenticate tag to password-protect a page with one static username and password. Use the mgiAuthenticateDB tag to password-protect a page with multiple usernames and passwords. The mgiAuthenticateDB tag can also be used to provide levels of access via groups. The authentication tags can only be used to password-protected individual pages. The authentication tags cannot be used to password-protect entire directories (folders) unless all pages in the directory contain the mgiAuthenticate or mgiAuthenticateDB tag.
In this example, an online client contract is password-protected.
Step 1: Create a contract page and open it in a text editor.
Step 2: Insert the mgiAuthenticate tag.
<mgiAuthenticate username="SysTek" password="3H84cy7">
Step 3: Save the contract page.
Step 4: FTP the contract page to the web server running MGI.
Step 5: View the contract page in a browser.
Comments and Notes
Usernames and passwords are both case-sensitive. When you distribute a username and password, note the importance of capitalization to the recipient.