87
Post request attribute rules
1.
Observe the following requirements when editing a form of an authentication page:
{
An authentication page can have multiple forms, but there must be one and only one form
whose action is
logon.cgi
. Otherwise, user information cannot be sent to the local portal
Web server.
{
The username attribute is fixed as
PtUser
. The password attribute is fixed as
PtPwd
.
{
The value of the
PtButton
attribute is either
Logon
or
Logoff
, which indicates the action
that the user requests.
{
A logon Post request must contain
PtUser
,
PtPwd
, and
PtButton
attributes.
{
A logoff Post request must contain the
PtButton
attribute.
2.
Authentication pages
logon.htm
and
logonFail.htm
must contain the logon Post request.
The following example shows part of the script in page
logon.htm
.
<form action=logon.cgi method = post >
<p>User name:<input type="text" name = "PtUser" style="width:160px;height:22px"
maxlength=64>
<p>Password :<input type="password" name = "PtPwd" style="width:160px;height:22px"
maxlength=32>
<p><input type=SUBMIT value="Logon" name = "PtButton" style="width:60px;"
onclick="form.action=form.location.search;">
</form>
3.
Authentication pages
logonSuccess.htm
and
online.htm
must contain the logoff Post
request.
The following example shows part of the script in page
online.htm
.
<form action=logon.cgi method = post >
<p><input type=SUBMIT value="Logoff" name="PtButton" style="width:60px;">
</form>
Page file compression and saving rules
You must compress the authentication pages and their page elements into a standard zip file.
•
The name of a zip file can contain only letters, numbers, and underscores.
•
The authentication pages must be placed in the root directory of the zip file.
•
Zip files can be transferred to the device through FTP or TFTP and must be saved in the root
directory of the device.
Examples of zip files on the device:
<Sysname> dir
Directory of flash:
0 -rw- 1405 Feb 28 2008 15:53:31 ssid2.zip
1 -rw- 1405 Feb 28 2008 15:53:20 ssid1.zip
2 -rw- 1405 Feb 28 2008 15:53:39 ssid3.zip
3 -rw- 1405 Feb 28 2008 15:53:44 ssid4.zip
2540 KB total (1319 KB free)
Redirecting authenticated users to a specific webpage
To make the device automatically redirect authenticated users to a specific webpage, do the
following in logon.htm and logonSuccess.htm:
1.
In logon.htm, set the target attribute of Form to
_blank
.
See the contents in gray:
<form method=post action=logon.cgi target="_blank">
2.
Add the function for page loading pt_init() to logonSucceess.htm.