Re: Creating 404 Not Found pages
This WebDNA talk-list message is from 1999
It keeps the original formatting.
numero = 23619
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 FoundStatus: 404
Error 404HTTP 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:
> 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 FoundStatus: 404
Error 404HTTP 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:
What is WebDNA (1997)
SiteCheck & WebCat ? (1997)
[showif]/[hideif] question (1997)
[WebDNA] [random] limit 1-10 (2010)
username = 115 (1999)
convert date and time (2005)
Secure server question (1997)
database files in secure folder (1997)
Running 2 two WebCatalog.acgi's (1996)
Showif, Hideif reverse logic ? (1997)
[searchstring] (2000)
Calendar (1997)
Trouble with Category search (2000)
4.x versions (2003)
Webcat no longer supported? (2006)
Force a search at the default.tmpl page? (1997)
searching multiple databases (1997)
Um. silly question perhaps...but I don't know, so I'm askin'.. (2001)
Modifying order output (1997)
shownext not showing next...still r2 (1997)