In some cases, you may want to provide a different look for the forms of some published Web sites. Each such look is defined by a form set. You can either modify an existing form set, or create your own custom form set.
The following sections describe:
Note the following:
-
When customizing the forms, you must keep all of the original form fields and all of the placeholders that ISA Server replaces with hidden fields. All input tags <input …> and form tags <form…> must remain unchanged in the .htm files, or the forms will not work. Also, you cannot change the format of the strings.txt file.
-
The Exchange and ISA folders are overwritten during upgrade. If you customize the HTML forms, be sure to make a backup of the updated files before applying any hotfix, service pack, or upgrade.
-
If you are running ISA Server Enterprise Edition, any changes made to the ISA Server form sets should be made on each ISA Server array member.
-
For the changes to take effect, you must restart the Firewall service.
-
Note that all the files found in forms customization directory can be accessed by anonymous users. Therefore, these files should not contain any sensitive information.
Customizing Text Strings
When ISA Server displays an HTML form, it replaces the placeholders in the .htm files with the strings in the strings.txt file of the language specified in the language settings of the client's browser, or as specified in the Web listener. Text string customization is done by modifying the strings in the strings.txt file that correspond to the placeholders in the .htm files.
Note the following:
-
Before customizing the content of the strings.txt file, we recommend that you make a backup of the strings.txt file that you are modifying.
-
Any strings that you modify or add must be properly encoded to comply with HTML syntax. The "<" character cannot be included in the string and should be replaced with
<. In addition, to include a quotation mark, the single quotation mark must be used instead of the double quotation mark.
The following example describes how you would change the text string for the user name input in the standard logon page from "Domain\user name:" to "Alias:".
To change the text for the user name input in the standard logon page
-
Open the strings.txt file in the appropriate language folder in the nls directory.
-
Find the string matching the placeholder @@L_username_ text. The string appears in the strings.txt file as: L_UserName_Text="Domain\User name:".
-
Change the text string to L_UserName_Text="Alias:".
-
Save the strings.txt file. When the HTML form is generated, the new value of @@L_username_text will be displayed in the form.
-
Restart the Microsoft Firewall service for changes to take effect.
In addition to modifying text strings, you can add new strings to a form. The following example shows how you would add a string to a form.
To add a string to a form
-
Open the .htm file
-
Add a placeholder for the string and save the file. The placeholder must be in the format of @@L_stringname. The placeholder cannot contain spaces.
-
Save the .htm file.
-
Add the corresponding string to the strings.txt file. The string must be written in the format L_stringname="string text".
-
Save the strings.txt file.
-
Restart the Firewall service for changes to take effect. When the HTML form is generated, the value of @@L_stringname will be displayed in the form.
Security Considerations
If you provide the strings.txt file to a third party for modification, validate that non-text additions have not been made to the file, because these may provide a means of attack on your networks.
Using Custom Graphics
You can either replace a graphic in a specific form or replace a graphic globally in all the forms so that the change appears in all .htm files that refer to that graphic.
The graphics that ISA Server uses in the HTML forms are all located in default forms directories (ISA and Exchange). The URL used to reference graphics is written as follows, where <filename> is the name of the file including extension: /cookieauth.dll?GetPic?formdir=%FORMDIR%&image=<filename>.
The following example describes how you would replace the logo graphic <lgntop.gif> with your own company logo <logo.gif>. In this example, you are modifying a form in the HTML directory.
To replace the logo graphic
-
Copy logo.gif to the ISA HTML form set directory.
-
Open the .htm file that includes the graphic you are replacing.
-
Modify the URL for the graphic, replacing the existing file name <lgntop.gif>. The modified URL is: /cookieauth.dll?GetPic?formdir=%FORMDIR%&image=logo.gif.
-
Save the file.
-
Restart the Firewall service for changes to take effect. When the form is generated, logo.gif will display in the form.
Alternately, to replace a graphic globally in all the forms, copy your graphic to the forms directory using the file name of the graphic you are replacing.
Creating Custom Form Sets
You can specify a different directory for forms other than the default ISA or Exchange directories provided by ISA Server 2006. This allows you to provide custom forms other than those provided by ISA Server.
For example, consider a scenario where you are publishing Web client access for two different companies and would like each company to have their own logo in the page, as well as other custom text strings. You would perform the following procedure.
To provide custom forms
-
Create a new folder in the \CookieAuthTemplates\ directory. For example, \ISA Server Installation Directory\CookieAuthTemplates\Company1.
-
Copy the contents of the ISA or Exchange folders into the new folder that you just created. If you only have standard browsers, you only need to copy the HTML folder.
-
Customize the form in the copied directory. Make any text changes to the strings.txt file in the appropriate language folder, or replace any graphics files. Do not change any of the HTML form elements, such as <FORM> and <INPUT>.
-
Restart the Firewall service for the changes to take effect.
-
To apply the new form set to a Web listener, provide the directory name on the Forms tab of the Web listener. Provide only the name of the directory, such as Company1, and not its full path. Alternately, to apply the new form set to a Web publishing rule, in the Application Settings tab of the rule, enable the Use customized HTML forms check box and provide the directory name.
-
To ensure that the forms are displayed only in a specific language, in the Forms tab of the Web listener, under Display the HTML form in this language, select the language. For example, to ensure that a form is displayed in English only, regardless of the client browser setting, you select English [en].
-
Repeat the procedure for the second company (Company2).
-
Click Apply in the Apply Changes bar to update the configuration.
Note that if you are running ISA Server Enterprise Edition, the forms directory must appear on all ISA Server array members.
Language Settings
By default, ISA Server builds the HTML forms using the strings.txt file from the language folder specified in the Languages option of Internet options of the client's browser. You can override the client language setting by specifying a language in the Web listener. In addition, if ISA Server does not locate the strings.txt file corresponding to the language settings, it uses the default strings.txt file.
Note that the language of the strings.txt file in the default directory is English. You can change the language of the default strings.txt file by replacing it with the strings.txt file from any one of the language folders.