rejetto forum

Software => HFS ~ HTTP File Server => HTML & templates => Topic started by: Xnorky on November 14, 2006, 10:34:24 AM

Title: Personnalize the 404 page
Post by: Xnorky on November 14, 2006, 10:34:24 AM
Hello !

At First, sorry for my english, i'm french...

I would like to personnalize the 404 page or when a directory doesn't exist...

In my template, i have this code :
Code: [Select]
[not found]
<h1>404 -  Not found</h1>
<a href="/">go to root</a>

But when a directory doesn't exist, the browser display :
Code: [Select]
404 - File not found
And i don't find this code in the template...

So how to display a personnalized page ?

Thanks



In French :
Je souhaiterais personnaliser la page 404 quand un répertoire n'existe pas...

Dans ma template, j'ai ce code :
[voir plus haut]

Mais quand un répertoire n'existe pas, le navigateur affiche :
Code: [Select]
404 - File not found
Et je ne trouve pas ce code dans la template...

Donc comment faire pour afficher une page personnalisée ?

Merci
Title: Re: Personnalize the 404 page
Post by: rejetto on November 14, 2006, 06:06:13 PM
which version are you using?
Title: Re: Personnalize the 404 page
Post by: Xnorky on November 15, 2006, 08:06:32 AM
HFS 2.1a
Title: Re: Personnalize the 404 page
Post by: TSG on November 15, 2006, 09:19:51 AM
[not found]
<div class=404>
   <h1>HTTP 404 -  Not Found</h1><a href="/"><img align=top src="/~img14" alt="">&nbsp;Back</a>
</div>

Add this code into the template?

Personalise with some css in the [style] like this.

.404 {
some css styling
}

And it should look something like the image attached.

[attachment deleted by admin]
Title: Re: Personnalize the 404 page
Post by: Xnorky on November 15, 2006, 11:16:50 AM
Code: [Select]
The same page display with your code...  :'(

<code>404 - File not found

And no page title...

I don't understand...
Title: Re: Personnalize the 404 page
Post by: Xnorky on November 15, 2006, 11:18:43 AM
And when I search this message (404 - File not found) in the template : nothing
Title: Re: Personnalize the 404 page
Post by: TSG on November 15, 2006, 11:23:06 AM
you need to make a [not found] section, do u have that, thats the 404 error section.
Title: Re: Personnalize the 404 page
Post by: Xnorky on November 15, 2006, 11:41:36 AM
The section [not found] exist in my template...
Title: Re: Personnalize the 404 page
Post by: Xnorky on November 15, 2006, 12:26:22 PM
It's OK !  :)

The section [error-page] didn't exist in my template...

Thanks...
Title: Re: Personnalize the 404 page
Post by: TSG on November 15, 2006, 12:33:28 PM
good work, i had a bit of trouble learning how the template works aswell.
Title: Re: Personnalize the 404 page
Post by: rejetto on November 15, 2006, 01:00:00 PM
i guess you are using a template for HFS 1, with no [error page] section.

to fix it, add this to the template
Code: [Select]
[error-page]
%content%


anyway, it would be a good thing to use a template compatible with HFS 2.