[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] Re-Directing users on a 404 error
- Subject: Re: [cobalt-users] Re-Directing users on a 404 error
- From: "Webmaster : Beyond2K" <Webmaster@xxxxxxxxxxxxxx>
- Date: Wed Apr 4 19:58:24 2001
- Organization: Beyond2K
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
Beware - using /404.html will only work if the errordocument is in the
current directory from which the browser is requesting the missing page.
This causes problems only in the following scenario:
You have a directory on your website eg. files (full url:
http://www.someplace.com/files/) and someone requests a file
http://www.someplace.com/files/file.htm which is not there - your
ErrorDocument 404 /404.html kicks in and redirects to /404.html which in
turn is not there - this then looks for a subdir on of /files called /files
and so on and so on - browser just keeps adding /files folders to the
address bar until stopped by the user.
I have only tested this in IE but this should not matter.
Test it for yourself - put a .htaccess file in your /web dir and make it
read:
ErrorDocument 404 /404.html
Then put your 404.html in the /web folder too.
make a dir in /web called files (/web/files/)
goto http://www.someplace.com/files/rubbish.htm
You see what I mean?
Simplest resolution - make ErrorDocument 404 read:
ErrorDocument 404 http://www.someplace.com/404.html
In other words an absolute url not a relative one.
Good luck
Beyond2K - Webmaster
---------------------------------------------
The World's premier mobile phone boutique
With free SMS & free personal No's
www.b2kcomms.co.uk
----- Original Message -----
From: "Carrie Bartkowiak" <ravencarrie@xxxxxxxx>
To: <cobalt-users@xxxxxxxxxxxxxxx>
Sent: Monday, March 26, 2001 12:02 PM
Subject: Re: [cobalt-users] Re-Directing users on a 404 error
> > You could also do this like I have in changing your
> > /etc/httpd/conf/srm.conf file to look like
> >
> > ErrorDocument 401 /cobalt_error/authorizationRequired.html
> > ErrorDocument 403 /cobalt_error/forbidden.html
> > #ErrorDocument 404 /cobalt_error/fileNotFound.html
> > ErrorDocument 404 http://www.saintspc.com.au/missing.php
> > ErrorDocument 500 /cobalt_error/internalServerError.html
>
> To change this for every site on the server and let each site have its
> own customized error page, do this instead:
> ErrorDocument 401 /401.html
> ErrorDocument 403 /403.html
> ErrorDocument 404 /404.html
> ErrorDocument 400 /500.html
>
> Then the site admin simply needs to put their own customized 401.html,
> 403.html, 404.html and 500.html into their web directory.
> Or they can customize further with an .htaccess file if you've given
> their directory permissions to do that in the srm.conf.
>
> For waaaaaaay more info on this (it's been beaten to death), check the
> archives.
>
> CarrieB
>
> _______________________________________________
> cobalt-users mailing list
> cobalt-users@xxxxxxxxxxxxxxx
> To Subscribe or Unsubscribe, please go to:
> http://list.cobalt.com/mailman/listinfo/cobalt-users
>