Kramer
Kramer

Reputation: 1078

Can I return an error code when an Apache SSI fails?

So I have a web application that uses Apache includes. Something like this:

<!--#include virtual="/some/application/component" -->

Now when /some/application/component fails, Apache still returns the rest of the page with missing output. I can set the errmsg config in order to display a specific error but the page itself is still returning a 200 response code. Is there a way that I can set the HTTP response code on the parent page (to 500) in the case of an SSI failure?

Thanks!

Upvotes: 2

Views: 113

Answers (0)

Related Questions