On 11 Jul 2005, at 21:21, Brad Perkins wrote:

Assuming the id corresponds to a table's id field, one way to do this is to verify the record exists before the page is displayed.

<%
  `put this at the top of the page before any HTML is sent out
   if (query params has("id"))
      QUERY([Table]ID = _query{"id})
      if (Records in selection ([Table]) = 0)
         redirect("/errors/404.a4d") `or some other error page
      end if
   end if
%>

Brad

Yes, thanks for that. Actually I already have something like this in place, but the problem is that a 'blind' robot will not know that this is a 404 error.

In the robot's and in my logs the error page will have been served correctly, as a '200' rather than a '404'.

If I redirect to a blank page, then my custom error page is served.

Any further thoughts would be much appreciated!

Best regards

David




_______________________________________________
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