Re: Creating 404 Not Found pages

This WebDNA talk-list message is from

1999


It keeps the original formatting.
numero = 23620
interpreted = N
texte = > 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: 404Error 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 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 | \________________________|______________________________/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Creating 404 Not Found pages (Dale LaFountain 1999)
  2. Re: Creating 404 Not Found pages (Gil Poulsen 1999)
  3. Re: Creating 404 Not Found pages (Mike_Davis 1999)
  4. Re: Creating 404 Not Found pages (Dale LaFountain 1999)
  5. Re: Creating 404 Not Found pages (Dale LaFountain 1999)
  6. Re: Creating 404 Not Found pages (Luke Melia 1999)
  7. Re: Creating 404 Not Found pages (Dave MacLeay 1999)
  8. Creating 404 Not Found pages (Gil Poulsen 1999)
> 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: 404Error 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 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 | \________________________|______________________________/ Dale LaFountain

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:

Sorry I didn't pay attention-but ??? (1997) PIXO (1997) Email (1998) How To question on setting up downloads (1997) Items XX to XX shown (1997) [carts] and databases (1997) File Upload and Platform (2001) Email (1998) Search and path arguments (1998) WCS Newbie question (1997) [countWords]? (1997) Big Databases (1997) Tip: upgrading to WebCatalog 3.x, fields to watch for (1999) Finding max value for a field (1997) japanese characters (1997) Show if time tags (1997) Sort Order on a page search (1997) [ot] Setting up OS X To Serve To Windows (2004) with Link i need to (1997) [WebDNA] Paypal Cert (2015)