Skip to content

Commit

Permalink
Added an error page and wired it up.
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Dow committed Jun 18, 2011
1 parent 00a3afa commit 96064d1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .htaccess
Expand Up @@ -17,4 +17,7 @@ RewriteRule (.*) http://gemerit.com/$1 [R=Permanent]

Redirect 301 /recents.php http://gemerit.com/search.php

ErrorDocument 404 /error.php
ErrorDocument 500 /error.php

AddHandler php5-script .php
11 changes: 11 additions & 0 deletions error.php
@@ -0,0 +1,11 @@
<html>
<head>
<title>GEMER_ERROR</title>
</head>
<body>
<h1>GEMER_ERROR</h1>
<p>
There appears to have been a gemer error, sorry about that.
</p>
</body>
</html>
5 changes: 4 additions & 1 deletion get.php
Expand Up @@ -9,5 +9,8 @@
else
$url = getLink($_REQUEST["hash"], false);
}
header( 'Location: ' . $url, true);
if ($url)
header( 'Location: ' . $url, true);
else
header( 'Location: /error.php', true);
?>

0 comments on commit 96064d1

Please sign in to comment.