On 28 Jan 2006, at 20:57, Aparajita Fishman wrote:

I have a 404.html page which is served up when an unknown page is requested. This currently has a '200' code in its request header.

How do I make this page, and this page only, return a '404' code in the request header?

If an error page returned a 404 status code, some browsers would not display your custom error page, but their own error page instead.

If you must change the status code, use the A4D_PostExecuteHook to change $ioResponseHeaderValues{2} to 200 when the code is 404.

I don't mind if browsers display their own message.

I need to change the status code only because I would like to use the site statistics option in Google Sitemaps, and this cannot be enabled unless a non-existent page is returned with a 404 status code.

How do I use the A4D_PostExecuteHook to change $ioResponseHeaderValues{2} to 200 when the code is 404?

I assume this is something to do with the 'On Web Connection' method, where I find the following commented code:

  `Uncomment and join together the next two lines to use the post-execute hook
                  `A4D_PostExecuteHook (->A4D_ResponseHeaderNames;
                  `->A4D_ResponseHeaderValues;->A4D_Response)
                
So, I will uncomment this.

What else do I need to do?

I'm using A4D version 3 with 4D Server 2003.

Thanks

David Wright

_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Reply via email to