Usage of iframe to show content from external source for block/continue pages

Usage of iframe to show content from external source for block/continue pages

0
Created On 09/26/18 13:50 PM - Last Modified 07/19/22 23:09 PM


Resolution


When you go to a site that is blocked with a URL filtering profile, you will see a blocked page that contains some basic helpful information about the web site, the user, the category, etc.

 

If the default response page for the block categories is used, the browser should show:

Screen Shot 2014-12-31 at 12.27.06 PM.png

 

There is an option to create a custom page, or even better, to show an externally served page from an external resource. An iframe can be used within the defined html of the custom response page.

 

To do so, create a custom block response page under Device > Response Pages > URL Filtering and Category Match Block Page. You can use the predefined page, by exporting it from the same menu, as a starting point to create your own template.

 

The predefined html file looks like this:

 

<html>

<head>

<title>Web Page Blocked</title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">

<style>

#content{border:3px solid#aaa;background-color:#fff;margin:40;padding:40;font-family:Tahoma,Helvetica,Arial,sans-serif;font-size:12px;}

  h1{font-size:20px;font-weight:bold;color:#196390;}

  b{font-weight:bold;color:#196390;}

</style>

</head>

<body bgcolor="#e7e8e9">

<div id="content">

<h1>Web Page Blocked</h1>

<p>Access to the web page you were trying to visit has been blocked in accordance with company policy. Please contact your system administrator if you believe this is in error.</p>

<p><b>User:</b> <user/> </p>

<p><b>URL:</b> <url/> </p>

<p><b>Category:</b> <category/> </p>

</div>

</body>

</html> 

 

In order to add any external content, use an iframe within the div tag and external content:

 

<html>

<head>

<title>Web Page Blocked</title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">

<style>

#content{border:3px solid#aaa;background-color:#fff;margin:40;padding:40;font-family:Tahoma,Helvetica,Arial,sans-serif;font-size:12px;}

  h1{font-size:20px;font-weight:bold;color:#196390;}

  b{font-weight:bold;color:#196390;}

</style>

</head>

<body bgcolor="#e7e8e9">

<div id="content">

<iframe src="http://10.193.83.102"></iframe>

<h1>Web Page Blocked</h1>

<p>Access to the web page you were trying to visit has been blocked in accordance with company policy. Please contact your system administrator if you believe this is in error.</p>

<p><b>User:</b> <user/> </p>

<p><b>URL:</b> <url/> </p>

<p><b>Category:</b> <category/> </p>

</div>

</body>

</html>

 

In the custom html file see the <iframe src="http://10.193.83.102"></iframe> tag.

Import the created custom html that contains the iframe.

 

Screen Shot 2014-12-31 at 12.28.56 PM.png

 

Now if you go to the browser and use the custom created response page you will see:

Screen Shot 2014-12-31 at 12.41.50 PM.png

 

The same concept is also valid if used for continue pages.



Actions
  • Print
  • Copy Link

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