Hi Hossein thanks for replying. Sorry, I should have said that it's not just happening with 404s. I tested it with all of the status codes below and none of them redirect. So is it the case that you should only use ns_returnerror with status codes not in the "redirects" parameter list? I'm a little confused.
ns_section ns/server/${server}/redirects ns_param 404 "/global/file-not-found.adp" ns_param 403 "/global/forbidden.html" ns_param 500 "/global/error.adp" ns_param 503 "/global/error.adp" ns_param 505 "/global/error.adp" thanks for the help Brian ________________________________________ From: AOLserver Discussion [aolser...@listserv.aol.com] On Behalf Of Hossein Sharifi [shar...@rateyourmusic.com] Sent: 26 February 2010 17:54 To: AOLSERVER@LISTSERV.AOL.COM Subject: Re: [AOLSERVER] ns_returnerror 404 and redirects In most cases, you should use ns_returnnotfound to return a 404 error. I'm pretty sure that the behavior of ns_returnerror is correct and expected. On Fri, Feb 26, 2010 at 6:31 PM, Fenton, Brian <brian.fen...@quest.ie<mailto:brian.fen...@quest.ie>> wrote: Hi I'm looking at using the 404 redirects in AOLserver. There was a recent bug fixed in 4.5.1. where 404s were not redirecting to the config file value e.g. ns_section ns/server/${server}/redirects ns_param 404 "/global/file-not-found.adp" This works great now when I try to access a page that doesn't exist - it redirects nicely to "/global/file-not-found.adp". However, when I make a call to ns_returnerror with a 404 from within a .tcl page, it doesn't redirect to "/global/file-not-found.adp" e.g. ns_returnerror 404 "This is some error text" gives me a page saying "Request Error" followed by the text I supplied to ns_returnerror. Is this expected behaviour i.e. a feature or a bug? thanks Brian -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to <lists...@listserv.aol.com<mailto:lists...@listserv.aol.com>> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank. -- Hossein Sharifi http://rateyourmusic.com -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to <lists...@listserv.aol.com> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank. -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to <lists...@listserv.aol.com> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.