%
IF NOT Session("PMMS_IN") = "True" THEN
Response.redirect "login.asp?ref_page=" & _
Server.URLEncode(Request.ServerVariables("URL") & "?" & Request.QueryString)
Response.End
END IF
%>
|
About This Page This page content is information text about protecting pages using MMS. The content will be whatever information you wish to protect; but the point is that it's only available to registered members, who are currently logged-in. In the case of this page, any member will be granted access. (Not group dependent.) If not already logged in, users will be taken to a login page. Only after entering a valid username and password combination, will they be redirected back to this originally requested page. There are other options for redirecting members at the time of login. When a member has multiple redirection rules, certain rules will apply. [ Read about redirections here. ] Note: Once you are logged in, opening another browser window does not mean that you are now 'logged-out' in this new window! Please verify that you are logged out when testing the login feature. How to Protect a Page: Simply add the following code to any of your pages to allow only registered members to view the page content. Please make sure that the path to login.asp is a valid url. Hint: If you have any common pages (like a header or footer file) add the code there rather than all the individual pages. <% IF NOT Session("PMMS_IN") = "True" THEN Response.redirect "login.asp?ref_page=" & _ Server.URLEncode(Request.ServerVariables("URL") & "?" & Request.QueryString) Response.End END IF %> Once the 4 lines of code above are added to your page, the page will be for members only, others will be required to login before they may view the page content. OR Optionally you can modify the path in the inc_check.asp file. Then add the following line for the same results. <!--#include virtual="/mms/inc_check.asp"-> To see the demo instructions again, click on the 'Home' button. (When testing, remember, you are now logged in.) |