Custom Response Pages Support for Non-ANSI Character Languages

Custom Response Pages Support for Non-ANSI Character Languages

21157
Created On 09/25/18 17:50 PM - Last Modified 06/12/23 16:17 PM


Resolution


Details

To install custom response pages in languages such as, Japanese or Chinese on the Palo Alto Networks firewall, save the HTML page in UTF-8 encoding.

 

In this example, a "URL Filtering and Category Match Block Page" translated to Japanese is being deployed:

  1. From the Palo Alto Networks firewall go to Device > Response Pages
    Screen Shot 2014-07-01 at 3.15.28 PM.png
  2. Select "URL Filtering and Category Match Block Page", check the Predefined box on the left and click on Export, a url-block-page.txt file will be downloaded by the browser:
    Screen Shot 2014-07-01 at 3.19.07 PM.png
  3. (Windows) Open the downloaded url-block-page.txt file with Notepad
    Screen Shot 2014-07-01 at 3.30.34 PM.png
    (Linux or Mac) Open the downloaded url-block-page.txt file with vi
    As shown in the example below, the file encoding us-ascii (ansi), edit the file with vi:
    Screen Shot 2014-07-01 at 3.54.28 PM.png
  4. Translate the text wanted to the target language, this can be done with a tool like Google Translate. For this example, Japanese is being used, select the Japanese text and paste it on Notepad or vi
    Screen Shot 2014-07-01 at 3.57.27 PM.png
  5. (Windows) As shown below, Japanese text pasted in Notepad:
    Screen Shot 2014-07-01 at 4.01.44 PM.png
    Save the file in Notepad using the "Save As" option. From the Encoding drop down list, select "UTF-8" for the file encoding.
    Screen Shot 2014-07-01 at 4.07.13 PM.png
    (Linux or Mac). For vi, enter the following commands before pasting:
    :set bomb
    :set fileencoding=utf-8
    As shown below, paste the text in Japanese:
    Screen Shot 2014-07-01 at 4.03.40 PM.png
    Save and quit with command:
    :wq

    Verify that the file is now encoded with UTF-8, as shown in the following example:
    Screen Shot 2014-07-01 at 4.15.54 PM.png

  6. Go back to the firewall WebUI, select "URL Filtering and Category Match Block Page", click "Import", browse for the modified url-block-page.txt file, and click OK
    Screen Shot 2014-07-01 at 4.18.21 PM.png
    Screen Shot 2014-07-01 at 4.18.42 PM.png
  7. Commit, the response page with foreign language characters will now be installed
    Screen Shot 2014-07-01 at 4.20.46 PM.png

 

Note: The custom response pages is a global setting (per vsys). If saving the format as "Unicode", there will be an error when importing the HTML file to the firewall

 

owner: mivaldi



Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA10g000000ClKKCA0&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail

Choose Language