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: SSI not working on page used in ErrorDocument directive |
|
Author |
|
capachoty
Joined: 22 Jun 2015 Posts: 4
|
Posted: Thu 23 Jul '15 20:36 Post subject: SSI not working on page used in ErrorDocument directive |
|
|
Firstly SSI are working on my server. If i access the file directly everything functions as expected.
Code: | Enter in browser: http://example.com/apps/pagenotfound/index.html
Which is a symlink to: /temp/comp/apps/applayer/index.html
|
When I manually hit the 404 page all the SSI statements resolve and it looks fine.
The issue arises when I plug the 404 page into my Error Document as follows:
Code: |
ErrorDocument 404 /apps/pagenotfound/index.html |
If I then type in a trash page it calls the custom 404 page correctly but none of the SSI statements function. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Fri 24 Jul '15 18:09 Post subject: |
|
|
How did you add the SSI handler to html? |
|
Back to top |
|
capachoty
Joined: 22 Jun 2015 Posts: 4
|
Posted: Fri 24 Jul '15 20:57 Post subject: |
|
|
So I believe I figured my issue out.
I had my ErrorDocuments defined early on in my config before my directory definitions.
I have a directory definition below where I configure apache to parse html files for ssi directives but only .html files that live in this directory.
I assumed that even though the ErrorDocument was outside of the directory definition, since it was referencing a file that was inside the directory it should be fine.
It did not seem to work though. Once I added the AddOutputFilter INCLUDES .html before the ErrorDocument definition then it worked without issue.
However I don't want to parse every .html file on my site for SSI so for SSI on my 404 page I may enable standard .shtml parsing. |
|
Back to top |
|
|
|
|
|
|