Redirecting unauthorized users to another page

Redirecting unauthorized users to another page

To prevent unauthorized users from accessing a page, add a Restrict Access To Page server behavior to it. The server behavior redirects the user to another page if the user attempts to bypass the login page by typing the protected page’s URL in a browser, or if the user is logged in but attempts to access the protected page without the proper access privileges.

If you want to give many pages on your site the same access rights, you can copy and paste access rights from one page to another.

To redirect unauthorized users to another page:

  1. Open the page you want to protect.
  2. In the Server Behaviors panel (Window > Server Behaviors), click the Plus (+) button and select User Authentication > Restrict Access To Page from the pop-up menu.

    The Restrict Access To Page dialog box appears.

  3. Complete the dialog box.

    For instructions, see Setting the Restrict Access To Page dialog box options.

  4. Click OK.

Dreamweaver adds a server behavior to the page that allows only authorized users to view the page.

To copy and paste a page’s access rights to other pages on the site:

  1. Open the protected page and select the Restrict Access To Page server behavior listed in the Server Behaviors panel (not the one in the Plus (+) pop-up menu).
  2. Click the arrow button in the top right corner of the panel and select Copy from the pop-up menu.

    The Restrict Access To Page server behavior is copied to your system’s Clipboard.

  3. Open another page you want to protect in the same way.
  4. In the Server Behaviors panel (Window > Server Behaviors), click the arrow button in the top right corner and select Paste from the pop-up menu.
  5. Repeat steps 3 and 4 for each page you want to protect.

Related topics

  • Storing access privileges in the user database


Getting Started with Dreamweaver
Dreamweaver Basics
Working with Dreamweaver Sites
Laying Out Pages
Adding Content to Pages
Working with Page Code
Preparing to Build Dynamic Sites
Making Pages Dynamic
Developing Applications Rapidly
Building ColdFusion Applications Rapidly
Reference
Building ASP.NET Applications Rapidly
Building ASP and JSP Applications Rapidly
 
ASPTreeView.com
 
Evaluation has РСУ»ЕХФexpired.
Info...