rejetto forum

Personnalize the 404 page

Guest · 11 · 5332

0 Members and 1 Guest are viewing this topic.

Xnorky

  • Guest
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


Offline rejetto

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


Offline TSG

  • Operator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs
[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]


Xnorky

  • Guest
Code: [Select]
The same page display with your code...  :'(

<code>404 - File not found

And no page title...

I don't understand...


Xnorky

  • Guest
And when I search this message (404 - File not found) in the template : nothing


Offline TSG

  • Operator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs
you need to make a [not found] section, do u have that, thats the 404 error section.


Xnorky

  • Guest

Xnorky

  • Guest
It's OK !  :)

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

Thanks...


Offline TSG

  • Operator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs
good work, i had a bit of trouble learning how the template works aswell.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
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.