On 12 Jul 2005, at 18:55, Aparajita Fishman wrote:
I'm using WebSTAR for all but the html, so I can allow Active4D to
check if a page (or rather, the record necessary to create a page)
exists, and if not then redirect to a non-existent file such as
error.pdf or error.txt.
This works OK and WebSTAR returns a 404 code when I call up a
non-existent page, but for some reason my logs show that the
problematic visiting robot is receiving 303 codes for such pages.
This is OK for now, so I can safely go and lie in a darkened room. I
expect that there must be a better way, though.
Allow me to point your attention to the On Request event handler
section in the documentation. Therein lies that which you seek.
Thanks, I've looked at the options there.
I'd need to have the "On Request" handler check to see which page is
being requested, then if it is one which relies on there being a record
in the database, to check if this record exists and then return the 404
code if not.
My concern is that an "On Request" handler will run for every page
request. Since I have a dozen large sites running from Active4D and,
perhaps, 40 different sets of dynamic pages, it would be quite a
lengthy 'case of' chunk of code. Would this give me a noticeable speed
reduction in serving up the pages, do you think?
Assuming my code identifies a request for a page for which the record
does not exist, then I want to return a 404 response. So, I use 'set
response status'. Do I then have to forward to a dummy page to actually
send the response to the requesting host, or does this happen
automatically?
Thanks again!
David
_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/