crmpicco
11-28-2007, 02:42 PM
I have a set of 5 error message HTML page up on the server now, 400, 401, 403, 404 and 500.
I have 400.shtml, 401.shtml and so on and these files contain the single line:
<!--#include virtual="400.htm"-->
400.htm is just a simple HTML document with a short message:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>AyrshireMinis.com - a Mini E-Community</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META HTTP-EQUIV="CONTENT-LANGUAGE" CONTENT="EN">
<META NAME="revisit-after" CONTENT="14 days">
<META NAME="robots" CONTENT="all">
<META NAME="Author" CONTENT="Craig Richard Morton">
<META NAME="Copyright" CONTENT="AyrshireMinis.com 2007">
<link rel="stylesheet" type="text/css" href="/mini/inc/style.css">
</HEAD>
<BODY>
<br><br><br><br>
<div style="margin-left: auto; margin-right: auto; margin-top: 100px; width: 600px; padding: 10px; border-style: dashed; color: #FFFFFF; font-family: Verdana; font-size: 8pt;">
<div style="font-size: 28pt; text-align: center;">AyrshireMinis.com</div>
<br>
Sorry, there has been an error.<br><br>
This error (400 bad request), means that a request for a URL has been made but the server is not configured or capable of responding to it. This might be the case for URLs that are handed-off to a servlet engine where no default document or servlet is configured, or the HTTP request method is not implemented.
<br><br><br>
If this error persists, please contact the Administrator at <a href="mailto:email@removedbecauseofspammers.com?Subject=400 Error" style="color: #FFFFFF; font-weight: bold;">info [AT] ayrshireminis [DOT] com</a>
<br><br><br>
</div>
</BODY>
</HTML>
Can anyone advise how I can setup my .htaccess files to get these working properly? My .htaccess file currently looks like:
# -FrontPage-
IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName ayrshireminis.com
AuthUserFile /home/ayrshire/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/ayrshire/public_html/_vti_pvt/service.grp
AddHandler application/x-httpd-php5 .php
ErrorDocument 400 http://www.ayrshireminis.com/400.shtml
I also have a small PHP script - http://www.ayrshireminis.com/mini/400test.php - to allow me to test a 400 error, with the code:
<?php
header("HTTP/1.1 400 Bad Request");
header("Status: 400 Bad Request");
?>
However, no page is shown. Just a blank white page.......
Any help appreciated,
Picco
I have 400.shtml, 401.shtml and so on and these files contain the single line:
<!--#include virtual="400.htm"-->
400.htm is just a simple HTML document with a short message:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>AyrshireMinis.com - a Mini E-Community</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META HTTP-EQUIV="CONTENT-LANGUAGE" CONTENT="EN">
<META NAME="revisit-after" CONTENT="14 days">
<META NAME="robots" CONTENT="all">
<META NAME="Author" CONTENT="Craig Richard Morton">
<META NAME="Copyright" CONTENT="AyrshireMinis.com 2007">
<link rel="stylesheet" type="text/css" href="/mini/inc/style.css">
</HEAD>
<BODY>
<br><br><br><br>
<div style="margin-left: auto; margin-right: auto; margin-top: 100px; width: 600px; padding: 10px; border-style: dashed; color: #FFFFFF; font-family: Verdana; font-size: 8pt;">
<div style="font-size: 28pt; text-align: center;">AyrshireMinis.com</div>
<br>
Sorry, there has been an error.<br><br>
This error (400 bad request), means that a request for a URL has been made but the server is not configured or capable of responding to it. This might be the case for URLs that are handed-off to a servlet engine where no default document or servlet is configured, or the HTTP request method is not implemented.
<br><br><br>
If this error persists, please contact the Administrator at <a href="mailto:email@removedbecauseofspammers.com?Subject=400 Error" style="color: #FFFFFF; font-weight: bold;">info [AT] ayrshireminis [DOT] com</a>
<br><br><br>
</div>
</BODY>
</HTML>
Can anyone advise how I can setup my .htaccess files to get these working properly? My .htaccess file currently looks like:
# -FrontPage-
IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName ayrshireminis.com
AuthUserFile /home/ayrshire/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/ayrshire/public_html/_vti_pvt/service.grp
AddHandler application/x-httpd-php5 .php
ErrorDocument 400 http://www.ayrshireminis.com/400.shtml
I also have a small PHP script - http://www.ayrshireminis.com/mini/400test.php - to allow me to test a 400 error, with the code:
<?php
header("HTTP/1.1 400 Bad Request");
header("Status: 400 Bad Request");
?>
However, no page is shown. Just a blank white page.......
Any help appreciated,
Picco