BeachBum Software

Tools

Setting Server Response Codes


For ASP, use the following code:

<%
  response.buffer = true
  response.status = "200 OK"
%>
Setting the response buffer is helpful if you are going to redirect someplace else. Remember that the response.buffer must come before any output is sent to the response. If you're using IIS5 or newer think about using server.transfer instead of response.redirect. It's trouble getting response.redirect to not send a 302 redirect header.


For CFM, use the following code:

<cfheader statuscode="200" statustext="OK">
Coldfusion, as usual, doesn't require much hoop jumping to get this to work, it just does.

For PHP, use the following code:

<?php
  header("HTTP/1.0 200 OK");
?>


That is all of the examples I can come up with off the top of my head. If you need to set a response code other than "200 OK" refer to the list of available headers HTTP status codes.
If you don't know what status codes your site is serving use our tool for viewing these: HTTP header viewer
 
BeachBum Software
© 2002-2005 BeachBum Software. All Rights Reserved.