How to configure my 404 response

Posted by Evylent on Server Fault See other posts from Server Fault or by Evylent
Published on 2012-11-09T13:05:43Z Indexed on 2012/11/09 23:05 UTC
Read the original article Hit count: 204

Filed under:

How would I be able to correctly redirect a person who visits my site to my 404 page? I have already created my 404.php file as:

<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Page not found | Twilight of Spirits</title>
<link rel="stylesheet" href="http://forum.umbradora.net/template/default/css/404.css">
<link rel="icon" type="image/x-icon" href="/favicon.png">
</head>
<body>
<div id="error">
  <a href="http://forum.umbradora.net/">
    <img src="/forum/template/default/images/layout/404.png" alt="404 page not found"   id="error404-image">
  </a>
</div>


<div id="mixpanel" style="visibility: hidden; "></div></body></html>

My .htaccess file is:

ErrorDocument 404 http://forum.umbradora.net/404.php

Now when I go to my site and enter a false link such as mack.php or total.html, I get this error:

Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Any ideas on how to solve this? I have tried switching from subdomain to my normal path, still get errors.

© Server Fault or respective owner

Related posts about php