summaryrefslogtreecommitdiff
path: root/errors
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2012-07-01 13:18:47 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2012-07-01 13:18:47 +0100
commit5f5fa631013417dd4c9010e3b12084f3bd805895 (patch)
tree30956a49dffdb9382cb37dcec71c36a6feebacad /errors
downloadnetsurf-website-5f5fa631013417dd4c9010e3b12084f3bd805895.tar.gz
netsurf-website-5f5fa631013417dd4c9010e3b12084f3bd805895.tar.bz2
Transfer current state of netsurfweb as a fresh line of history
Diffstat (limited to 'errors')
-rw-r--r--errors/404.en55
-rw-r--r--errors/406.php52
2 files changed, 107 insertions, 0 deletions
diff --git a/errors/404.en b/errors/404.en
new file mode 100644
index 0000000..b0b5409
--- /dev/null
+++ b/errors/404.en
@@ -0,0 +1,55 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<title>NetSurf | 404 Error</title>
+<link rel="stylesheet" type="text/css" href="/netsurf.css">
+<link rel="icon" type="image/png" href="/webimages/favicon.png">
+</head>
+
+<body>
+<p class="banner"><a href="/"><img src="/netsurf.png" alt="NetSurf"></a></p>
+
+
+
+<div class="onlycontent">
+
+<p class="breadcrumbs"><a href="/">Home</a> Error: Not found</p>
+
+<h1>Error 404: Not found</h1>
+
+<p>Sorry, the page you're looking for doesn't exist. Try one of the links below or use the site search facility.</p>
+
+<dl>
+<dt><a href="/">NetSurf homepage</a></dt>
+<dd>Introduction to NetSurf and project summary</dd>
+<dt><a href="/downloads/">Downloads</a></dt>
+<dd>Download the NetSurf web browser</dd>
+<dt><a href="/documentation/">Documentation</a></dt>
+<dd>User information, user guides and developer information</dd>
+<dt><a href="/developers/">Developer area</a></dt>
+<dd>Information for contributors to the project and developers</dd>
+<dt><a href="/webmasters/">Webmaster area</a></dt>
+<dd>Information for webmasters</dd>
+<dt><a href="/contact/">Contact us</a></dt>
+<dd>All the details you need to get in touch</dd>
+</dl>
+
+
+<div class="footer">
+<p>Copyright 2003 - 2009 The NetSurf Developers</p>
+</div>
+
+</div>
+
+
+<form method="get" action="http://www.google.co.uk/search">
+<div class="searchbox">
+<input type="hidden" name="q" value="site:netsurf-browser.org">
+<input type="text" name="q" maxlength="255"><br>
+<input type="submit" value="Search" name="btnG">
+</div>
+</form>
+
+</body>
+</html> \ No newline at end of file
diff --git a/errors/406.php b/errors/406.php
new file mode 100644
index 0000000..f8cd231
--- /dev/null
+++ b/errors/406.php
@@ -0,0 +1,52 @@
+<?php
+# Prevent a 406 being sent when there is no match for the user's
+# Accept-Language available. Instead, send the English version,
+# or the png, as appropriate.
+
+# It would be better to use a file from the Alternates
+# response-header, but apache_response_headers() is only available
+# in PHP 4.3.0 or later.
+
+$f = substr($_SERVER["REQUEST_URI"], 1);
+if (substr($f, -1) == "/" or $f == "")
+ $f .= "index";
+
+if (is_file($f . ".en")) {
+ $f .= ".en";
+ header("HTTP/1.1 200 OK");
+ header("Content-Location: " . $f);
+ header("Last-Modified: " . gmdate("D, d M Y H:i:s ", filemtime($f)) . "GMT");
+ header("Content-Length: " . filesize($f));
+ header("Content-Language: en");
+ readfile($f);
+} elseif (is_file($f . ".png")) {
+ $lang = substr($f, -2);
+ $f .= ".png";
+ header("HTTP/1.1 200 OK");
+ header("Content-Location: " . $f);
+ header("Last-Modified: " . gmdate("D, d M Y H:i:s ", filemtime($f)) . "GMT");
+ header("Content-Length: " . filesize($f));
+ header("Content-Language: " . $lang);
+ header("Content-Type: image/png");
+ readfile($f);
+} else {
+ header("HTTP/1.1 406 Not Acceptable");
+ header("Content-Language: en");
+ print <<<END
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head><title>Language Negotiation Failure</title></head>
+<body>
+<h1>Language Negotiation Failure</h1>
+<p>A problem occurred when finding the requested file in your
+language. Please email james@semichrome.net quoting the following
+so that the problem can be rectified.</p>
+<p>REQUEST_URI: {$_SERVER["REQUEST_URI"]}<br>
+Accept-Language: {$_SERVER["HTTP_ACCEPT_LANGUAGE"]}</p>
+</body></html>
+
+END;
+}
+
+?>