NOTE: The ability to create custom error pages is only available if you have a paid hosting account. Free accounts do not usually allow this.
Hosting companies provide tutorials on how to do this. Just Google "custom error pages" + Your host name.
If you are hosting your site on 1and1's Linux servers, there are three ways you can use to create custom error pages.
The easiest way to create custom error pages is to create the page and give it one of the following names depending on the error page you are creating:
The files would then be uploaded to the directory where your particular domain resides. If you are hosting multiple sites on your server space, this is NOT the root directory.
EXAMPLE: My site genealogy-web-creations.com points to a folder genealogy-web-creations. I upload the error pages to the folder genealogy-web-creations.
If you have an external style sheet attached to your error page, you should link to the absolute url http://www.my-domain.com/my-stye-sheet.css. If you don't and your page may not display as expected for pages not located in your root directory.
You can test to see if your page works by typing in your url http://www.your-domain.com/any-file-that-does-not-exist.html
Step 1: Create the HTML page you want to use as your error message and upload it to your home directory (the directory where your domain resides.)
Step 2: Create a .htaccess file (using NotePad or a similar program) and add these lines which specify the substitution.
EXAMPLES:
Step 3: Upload the .htaccess file into your home directory (the directory where your domain resides. You will not see it once uploaded since it gets hidden by the server. When you are transferring the files, make sure you choose ascii as the transfer type. NOTE: If you already have an .htaccess file, just add the lines to the file that already exists. Using a .htaccess file does not work for PHP files.
Step 4: You can test to see if your page works by typing in your url http://www.your-domain.com/any-file-that-does-not-exist.html
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule (.*) /errordocument.html
Create a file named "errordocument.html" containing your error message content. Upload the document to the directory where your domain resides.
NOTE: I have used the first two methods but not the last one.
Planning a Genealogy Website 2nd Edition is available as a 42 page EBook in pdf format for you to download. It has been totally revised and updated with new content. The EBook is zipped for faster download. Save it to your desktop, extract the file and it is ready to use.
April 2007 - April 2013
Disclosure: This is an affiliate link, which means that if you visit Bluehost.com through this link and purchase this product, I’ll get a commission.
Microsoft® and FrontPage® and Expression Web® are registered trademarks of Microsoft® Corporation.
Genealogy Computer Tips | Expression Web Tutorials & Templates