rejetto forum

Custom Error Pages

Guest · 15 · 6204

0 Members and 1 Guest are viewing this topic.

Dan

  • Guest
I have looked everywhere I could possibly think of, so I apologize if this has been answered somewhere, but I cannot figure out how to make custom error pages (404, 403, 401).  Could someone please explain this to me?  Thanks.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile

Dan

  • Guest
I tried that, but when I ban myself and go to my server, I get this message:

403 - You are not allowed to access this file
 ??? ???


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
i just tried to ban myself, then got this message
You are banned.
adgoaia
HttpFileServer 2.1a
07/11/2006 20.31.46


Dan

  • Guest
This is the code I have:

Code: [Select]
[ban]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<title>Oh, fuck...</title>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1251">
<style type="text/css" media="screen">\n%style%\n</style>
</head>
<body>
<div id="content">
<div id="divPageBody">
<div id="divTitle">Bann!</div>
<h1>Great! You're permanently BANNED!</h1>
<b>%reason%</b>
    <!-- FOOTER -->
<DIV id="divFooter">
<TABLE cellSpacing="0" cellPadding="0" width="500" align="center" border="0">
  <TBODY>
  <TR>
    <TD height="20" width="100%">&nbsp;</TD></TR>
  <TR>
    <TD><HR></TD></TR>
  <TR>
<TD class="copyright"><br>&copy; 2005 Roman V. Brooks.<BR>All Rights Reserved.</TD>
</TR><tr><td align="center">&nbsp;<br /><a href="http://www.rejetto.com/hfs" target="_blank" class="copyright" >Powered by HFS %version%</a></td></tr>
  <TR>
    <TD height="20" width="100%">&nbsp;</TD></TR>
</TR>
</TBODY></TABLE></div>
   <!-- END FOOTER -->

Do I need to change something?
« Last Edit: November 07, 2006, 07:40:52 PM by rejetto »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
this is not the original template.
try using the default template and see if the problem disappear.


Dan

  • Guest
Is there a way for me to see where the 403 message is being pulled from?  I can't find that in the template at all.  :(


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
involved section of the template may be [ban] and [deny]
have a look at them.

that message you got is furnished by HFS if the section is missing in the template.


Dan

  • Guest
I changed both the banned and denied section to read only "Banned", but I am still getting that same 403 message which doesn't seem to exist in the template.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
before, you should test with the default template.
tell me if the default template works good for you.


Dan

  • Guest
Yes, it works with the default template.  Must be an error somewhere in this template.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
try adding this to your template

[error-page]
%content%



Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
your template is for an old version of HFS, i guess pre-2.0

try searching for a newer version