How do I create a "404 - page not found" page for my hosting?

  1. Create the desired error page in a html editor, just as you would create any other page of your website. You can adapt the page to your taste (text, links, images, ...). This will be the page that will be displayed instead of the 404 error page.
  2. Save this as a .html file (e.g. 404.html).
  3. Upload this page via FTP to your web space. You could place the file in the directory "errors".
  4. Catching errors:
    1. LINUX hosting:
      • Create a new text file (htaccess.txt)
      • Add the following line:
        ErrorDocument 404 /errors/404.html
        Now you are referring to the file "404.html" that you placed in the directory "errors". In case you chose another file name and/or directory, adapt this code to the names you chose.
      • Save the file and place it in the wwwroot folder of your web hosting.
      • You now need to adapt your file name from "htaccess.txt" to ".htaccess" by using your FTP program. It is thus a file without an extension.
      • If your visitors try to access a non-existent page, they will see the "404.html" page. If this has to be another file, you indicate that file.
    2. WINDOWS hosting:
    3. Place your desired 404 page in your web space and choose one of the following solutions. 
        1. Display of static HTML page:
        2. Display of dynamic ASP.NET page:
        3. Forward to a different URL:
Aangemaakt door : - Mon, Nov 21, 2011 10:52 AM. Dit artikel werd 7302 keer bekeken.
Online URL: https://onlinehelp.cloud.telenet.be/article.php?id=1942

Powered by PHPKB (Knowledge Base Software)