Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Can I return an error code when an Apache SSI fails? |
|
Author |
|
kramer2718
Joined: 20 Aug 2018 Posts: 1 Location: St. Louis, MO
|
Posted: Mon 20 Aug '18 17:54 Post subject: Can I return an error code when an Apache SSI fails? |
|
|
Running Apache 2.2.15 on Linux 2.6.32.
I have a web application that uses Apache includes. Something like this:
Code: | <!--#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? Or set a custom HTTP header might work too.
Failing that, is there another way I can manage proper error handling in the case of an SSI failure? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
|
Back to top |
|
|
|
|
|
|