Page 404

  Pesala 18:56 07 Oct 03

In a few weeks I shall be ready to update my website, but the address of many pages will change due to the redesign and changes to the directory structure.

How can I create my own Page 404 with a few links that will redirect users to the appropriate pages when they click on an out-of-date link to a page that is no longer found on my domain?

  Forum Editor 19:17 07 Oct 03

I'll need to know which server your site's running on - Windows or Unix (Apache).

  Pesala 19:24 07 Oct 03

Does this tell you anything click here

That is the host of my website manager.

  Forum Editor 20:05 07 Oct 03

So here's what you need to do:

1. Create a new HTML error page - include an appropriate message to your visitors along the lines of:

You are here because the page you wanted has been moved. On this page you'll find links to all new page locations - please click the one you need, and thank you for your patience.

Then include hyperlinks to the various pages.

N.B. Make sure that the hyperlinks contain absolute paths to the pages in question - the full http: bit, followed by all the rest of the url.

Save the new page as: 404error.html (or whatever name you choose) and upload it to your web in the www root - that is at the top of your webspace.

2. Fire up Notepad, and create a file with the following line of text:

ErrorDocument 404 /404error.html (substitute the name that you chose for your error page after the slash)

Make sure that you type the text exactly as it is here as mistake can be a major problem - the text is case sensitive, so 'errordocument' will not work.

3. Now save the file as: .htaccess and upload it to your server via FTP in ASCII mode. Put the file in the click here with the error page. If it appears on the server as .htaccess.txt rename it (in FTP) to .htaccess

That's it. Visitors will now be redirected to your custom 404 error page.

Any problems - report back. If you get stuck I'll step you through the procedure as you do it.

  Pesala 20:17 07 Oct 03

I have copied your response to a file and will report back when I get around to doing it - perhaps not until the website is ready to upload.

  tbh72 22:12 07 Oct 03

The simpliest form of error redirection is the simple use of index.htm pages uploaded to each directory. You can create the page however you choose & even include an automatic redirect if you wish.

  Pesala 22:27 07 Oct 03

My site has a lot of directories. I would need about twenty index.html files if I understand you correctly. What I think I need is a single page 404 with a few links.

Most not found errors can be manually redirected via a link to the Library page - click here - which is a table of contents of all the books on the site. The site will be moved to when all is finished working well enough.

  Forum Editor 22:32 07 Oct 03

is the .htaccess method I outlined. You do it once - it takes ten or fifteen minutes, and that's that.

  Pesala 10:20 10 Oct 03

I created the this redirection page click here, which I copied to the root directory of my website. (I tried first to my NTL home page root:
http;// but that didn't work either).

Likewise, I created the file htaccess.txt with the line: ErrorDocument 404 /404.html, uploaded it to http;// and renamed it to .htaccess, whereupon it just disappeared from view.

Page 404.html is there OK and the link to my library page works as it contains the full path, but entering any non existent page still redirects me to the usual NTL Not Found Page.

  Forum Editor 17:29 10 Oct 03

will be a hidden file on a Unix server, so don't worry about that - it's there alright.

Did you remember to upload the .htaccess file to the server in ASCII mode (not binary)?

There may be a problem with the way NTL directory structures work - both the .htaccess and the 404.html need to be in the same place.

  powertool 20:42 10 Oct 03

Hi - I was really pleased to see this thread as I have been thinking about doing this, so I followed the instructions but the FTP won't let me upload the .htaccess file. The message is

< 550 .htaccess: Forbidden filename
Error 550 .htaccess: Forbidden filename

Does this mean that the server is a different sort? the server is - any advice on what file name to use is gratefully accepted!


This thread is now locked and can not be replied to.

Surface Pro (2017) vs Surface Pro 4

20 groundbreaking 3D animation techniques

How to mine Bitcoin on Mac