Re: Creating 404 Not Found pages
This WebDNA talk-list message is from 1999
It keeps the original formatting.
numero = 23638
interpreted = N
texte = Thanks, Dale. This is working great!Dale LaFountain wrote:> > > At 9:43 AM 2/11/99, Luke Melia wrote:> >>At 7:32 AM 2/11/99, Gil Poulsen wrote:> >>>This is not a big deal but just something that has been bothering me for> >>>a while. With WebCat set to process all pages, spiders and robots from> >>>search engines continue to index pages that have been deleted from my> >>>site because they do not receive a 404 File Not Found error, as they> >>>would if Web* was serving the error page. Is there any way to remedy this?> >>> >>You should be able to edit your ErrorMessages.db file and replace the> >>default response with something using [ReturnRaw] to give a 404.> >> > If anyone is doing this, I'd be very interested in seeing some sample code> > as I've got the same desire that Gil does.> >> > Yours in Success,> > Luke> >> > Gil and Luke,> > It would be nice to be flexible and give normal users a nicely> formatted error message, but also send search engines 404 errors so> your old links can get purged from their databases.> > We use browser detection our error page to give spiders the right> answer when pages no longer exist. In errormessages.db for template> not found we use:> > [INTERPRET][include file=/Error.html][/INTERPRET]> > and something like this in error.html (browsername list truncated for brevity):> > > [MATH show=f]sp=0[/MATH]> [SHOWIF [URL][BROWSERNAME][/URL]^ArchitextSpider][MATH> show=f]sp=1[/MATH][/SHOWIF]> [SHOWIF [URL][BROWSERNAME][/URL]^Scooter][MATH show=f]sp=1[/MATH][/SHOWIF]> > [SHOWIF [MATH]sp[/MATH]=1][ReturnRaw]HTTP/1.0 404 Not Found> Status: 404> >
Error 404>
>
HTTP Error 404
404 Not Found
> > The Web server cannot find the file or script you asked for. Please> check the URL to ensure that the path is correct.>
> > [/ReturnRaw]> [/SHOWIF]> > [HIDEIF [MATH]sp[/MATH]=1]>
File not found>
URL=http://www.darkhorse.com/index.html> > Sorry, that file has been moved or deleted. blah blah> [/HIDEIF]> > You could also use [IPADDRESS] to identify the spiders that don't> pass a unique browsername (a few masquerade as Mozilla 3.01), but> then you have to commit to maintaining the IP list as the search> engines change addresses and set up new machines for spidering.> > I would also suggest removing as many carriage return from the> template as possible (but NOT from inside the returnraw, you need> those). It makes for a much more compact Errorlog.txt...> > Good luck.> > -Dale> ________________________ ______________________________> | Dale LaFountain | mailto:dalel@dhorse.com |> | IT Director, WebMaster | http://www.dhorse.com/ |> | Dark Horse Comics, Inc.|Phone: 503-652-8815 x324 |> \________________________|______________________________/-- Gil Poulsen, Webmaster*************************************************************** AltiM@c * Phone: (908) 222-9001 ** 111 Mali Drive * FAX: (908) 222-9002 ** North Plainfield, NJ * e-mail: help@altimac.com ** 07062-2355 * WWW: http://www.altimac.com ***************************************************************
Associated Messages, from the most recent to the oldest:
Thanks, Dale. This is working great!Dale LaFountain wrote:> > > At 9:43 AM 2/11/99, Luke Melia wrote:> >>At 7:32 AM 2/11/99, Gil Poulsen wrote:> >>>This is not a big deal but just something that has been bothering me for> >>>a while. With WebCat set to process all pages, spiders and robots from> >>>search engines continue to index pages that have been deleted from my> >>>site because they do not receive a 404 File Not Found error, as they> >>>would if Web* was serving the error page. Is there any way to remedy this?> >>> >>You should be able to edit your ErrorMessages.db file and replace the> >>default response with something using
[returnraw] to give a 404.> >> > If anyone is doing this, I'd be very interested in seeing some sample code> > as I've got the same desire that Gil does.> >> > Yours in Success,> > Luke> >> > Gil and Luke,> > It would be nice to be flexible and give normal users a nicely> formatted error message, but also send search engines 404 errors so> your old links can get purged from their databases.> > We use browser detection our error page to give spiders the right> answer when pages no longer exist. In errormessages.db for template> not found we use:> >
[interpret][include file=/Error.html][/INTERPRET]> > and something like this in error.html (browsername list truncated for brevity):> > > [MATH show=f]sp=0[/MATH]> [SHOWIF
[url][browsername][/URL]^ArchitextSpider][MATH> show=f]sp=1[/MATH][/SHOWIF]> [SHOWIF
[url][browsername][/URL]^Scooter][MATH show=f]sp=1[/MATH][/SHOWIF]> > [SHOWIF
[math]sp[/MATH]=1]
[returnraw]HTTP/1.0 404 Not Found> Status: 404> >
Error 404>
>
HTTP Error 404
404 Not Found
> > The Web server cannot find the file or script you asked for. Please> check the URL to ensure that the path is correct.>
> > [/ReturnRaw]> [/SHOWIF]> > [HIDEIF
[math]sp[/MATH]=1]>
File not found>
URL=http://www.darkhorse.com/index.html> > Sorry, that file has been moved or deleted. blah blah> [/HIDEIF]> > You could also use
[ipaddress] to identify the spiders that don't> pass a unique browsername (a few masquerade as Mozilla 3.01), but> then you have to commit to maintaining the IP list as the search> engines change addresses and set up new machines for spidering.> > I would also suggest removing as many carriage return from the> template as possible (but NOT from inside the returnraw, you need> those). It makes for a much more compact Errorlog.txt...> > Good luck.> > -Dale> ________________________ ______________________________> | Dale LaFountain | mailto:dalel@dhorse.com |> | IT Director, WebMaster | http://www.dhorse.com/ |> | Dark Horse Comics, Inc.|Phone: 503-652-8815 x324 |> \________________________|______________________________/-- Gil Poulsen, Webmaster*************************************************************** AltiM@c * Phone: (908) 222-9001 ** 111 Mali Drive * FAX: (908) 222-9002 ** North Plainfield, NJ * e-mail: help@altimac.com ** 07062-2355 * WWW: http://www.altimac.com ***************************************************************
Gil Poulsen
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
suffix mapping for NT? (1997)
re:check boxes (1997)
Quit revisited (1997)
Credit Card Number checking (1997)
PSC recommends what date format yr 2000??? (1997)
SET-payment (2000)
Photo Album (2000)
Smith Micro - no competition (2000)
NT vs Mac (1997)
WebCat2b13MacPlugIn - [showif][search][/showif] (1997)
2nd WebCatalog2 Feature Request (1996)
shownext in Another Users.db (2000)
More on the email templates (1997)
WCS Newbie question (1997)
WebCat2b12 forgets serial # (1997)
WebCat2b13MacPlugIn - [include] (1997)
NetSplat and WebCat2 (1997)
A Show of Hands - Count WebCat Developers (2002)
[shownext] and sort (1998)
TeaRoom Order fields email account remain empty even though thewy are filled. (1997)