.htaccess and ErrorDocument
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- .htaccess and ErrorDocument
.htaccess and ErrorDocument
28-05-2008 6:32 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
ErrorDocument 404 /notfound.html
Uploaded to root of my CCGI space with permissions octal 644. The file notfound.html exists and displays correctly in browser if directly referenced. However, any attempt to browse a non-existent page produces a bog standard 404 error

Re: .htaccess and ErrorDocument
28-05-2008 6:35 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Do a pwd at the ccgi command prompt to get the full path.
Re: .htaccess and ErrorDocument
29-05-2008 8:04 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Thanks for replying so quickly. My .htaccess file now has a single line of the form:-
ErrorDocument 404 /files/home3/myusername/notfound.html
Does this look right? Sadly the result is the same. I am afraid that my scripting experience has so far been entirely Windows/ASP and this LAMP business is new to me.
Re: .htaccess and ErrorDocument
29-05-2008 8:46 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I am puzzled about the path.
At:-
http://www.javascriptkit.com/howto/htaccess2.shtml
is stated:-
"The initial slash in the directory location represents the root directory of your site, that being where your default page for your first-level domain is located."
Is this not true?
Re: .htaccess and ErrorDocument
29-05-2008 10:33 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
http://www.plus.net/support/webspace/tips_and_info/webspace_faq.shtml
14. How do I add a 404 type error page to my website?
If a visitor to your site clicks a dead link or mistypes a page address, you can present them with your own error page that can provide helpful links back to your site. To create an error page you need to first create the page and upload it to your site. Next, you create or edit a file called .htaccess that should be placed in your root directory. It should contain the following line -
ErrorDocument 404 /notfound.html
notfound.html should be the name and relative path to the error page you created. You don't need any further information, although you could add other errors such as:
ErrorDocument 400 /badrequest.html
ErrorDocument 401 /authorization.html
ErrorDocument 403 /forbidden.html
ErrorDocument 404 /notfound.html
ErrorDocument 500 /internalserver.html
Re: .htaccess and ErrorDocument
29-05-2008 3:05 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
ErrorDocument 404 /404.html
It seems to work fine.
Re: .htaccess and ErrorDocument
29-05-2008 4:18 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
ErrorDocument 404 /notfound.html
and it does not work

Re: .htaccess and ErrorDocument
30-05-2008 10:04 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Have you fixed it?
Re: .htaccess and ErrorDocument
30-05-2008 6:43 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I am not sure how you identified my web spaces but I am sure you have your methods. They are:-
http://ccgi.ringmarch.plus.com/
http://www.ringmarch.plus.com/
I cannot induce either to give me a custom 404 message with either IE7 or Firefox
Re: .htaccess and ErrorDocument
30-05-2008 7:13 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Sorry the page you asked for does not exist!
Home
The Home button doesnt work thou
Using Firefox
Re: .htaccess and ErrorDocument
31-05-2008 7:34 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
On IE7 Tools-->Internet Options-->Advanced among the selections there is
'Show friendly HTTP error messages' (friendly ;D) By default this is checked. Uncheck and the error page displays as intended.

With FireFox the fault may lie inadvertently with me. I have allowed AVG to install a toolbar. Again among the options is:-

"Let AVG make suggestions. . . . " is checked by default. Uncheck and all is well.
Thanks to all who have helped with suggestions, this has been a most frustrating experience and resulted in much tearing out of hair

Given this browser behaviour and the likelihood that most visitors to one's site will be using IE7 with default settings it seems hardly worth while providing them with a friendly error message

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- .htaccess and ErrorDocument