Kunnskapsbase

How do I use my own error pages on PHP hosting?

In some cases, it may be relevant to set your own error pages for various errors on your web site. The most common one is the "Not found" error page, shown when someone tries to access an URL that does not exist.

 

You can specify the document that is to be shown when you encounter an error by using your web site's .htaccess file:

ErrorDocument 404 file.html

In our example we used the file name file.html. You need to change it to the name of the file you want to be displayed instead of the default error page.

 

You can do the same for other error codes than 404 by typing the number of the error code you want in the code.


In order to modify the .htaccess file, you first need to open it for editing, or to create a new file if you don't have one already. See this guide for more information about how to do that

Kontakt
Should you not find what you are looking for then feel free to ask our support

Create A Ticket
Service Desk
Står du med en større udfordring, som kræver lidt mere ekspertise og tid end du har til rådighed?

Surftown Service Desk, er en service hvor vi foretager arbejdet for dig. Vores Service desk klarer opgaven for dig.

Gør det for mig