I have set up a web proxy that blocks specific websites. I would like to redirect the default “Forbidden” to an html file stored on the router. Is this possible?
I was able to redirect to an external site, but could not get the path right to get to a file named “test.html” that I ftp’d up to the directory where my backup files are kept.
Worth pointing out that that file doesn’t appear automatically (at least on any system I’ve tried it on) and I had to click on ‘Reset HTML’ in the web proxy settings window in Winbox.
That page also does not cover the content of the file webproxy/error.html. On my system it is created with the following content:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>ERROR: $(status)</title></head>
<body><h2>ERROR: $(status)</h2>
<hr noshade size="1px"/>
$(if error)
<p>While trying to retrieve the URL <a href="$(url)">$(url)</a>:</p>
<ul><li><strong>$(error)</strong></li></ul>
$(endif)
<p>Your cache administrator is <a href="mailto:$(admin)">$(admin)</a>.
$(signature)
</body></html>
and I have the following questions:
Why is there a section in an ‘if error’ clause? Is there any condition where the error.html file which says “ERROR” in it isn’t an error and this clause does not apply?
What are the possible options for ‘$(status)’ - it would be nice to edit that page to have some explanation for the user.
Where is ‘$(signature)’ defined? I would like to be able to remove ‘Mikrotik HttpProxy’ from the message to make it more personalised for the end user.