Skip to content

Commit 03d416e

Browse files
dbkindernashif
authored andcommitted
doc: fix 404 error page message
The custom 404 error page reports an incorret "url being requested" Signed-off-by: David B. Kinder <[email protected]>
1 parent f6210cf commit 03d416e

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

doc/404.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,14 @@ Sorry, Page Not Found
1414
</noscript>
1515
<script type="text/javaScript">
1616
<!--
17-
document.write("<p>Sorry, the page you requested: " +
18-
"<a href=\"" + location.href + "\">" +
19-
location.href + "</a> was not found on this site.</p>");
17+
var strReferrer=document.referrer;
18+
if (strReferrer.length > 0) {
19+
document.write("<p>Sorry, the page you requested: " +
20+
"<a href=\"" + strReferrer + "\">" +
21+
strReferrer + "</a> was not found on this site.</p>");
22+
} else {
23+
document.write("<p>Sorry, the page you requested was not found on this site.</p>")
24+
}
2025
//-->
2126
</script>
2227

0 commit comments

Comments
 (0)