A case study: how to make an older SSI code work with the latest Apache version
The web is an extremely dynamic environment where the core site availability engine – the Apache web server, is continuously updated by means of ‘’natural selection’’ – old features are deprecated and new features are released in their place.
Software developers, in turn, are responsible for keeping their code consistent with the latest web standards in order to sustain good levels of online performance.
In the majority of cases, backwards compatibility is what saves performance from degradation, if the code is not synchronized with the latest Apache standards.
This way, if a web server updates its software, all sites hosted there will continue to work without a problem.
There are still cases, however, where backwards compatibility is not a priority for the software developer.
This will often result in old code breaking, especially after a software update.
We’ve had a case like this on our web hosting platform recently and we would like to shed some light on the topic.
Just a few days ago, a customer contacted us because some SSI elements were not working on his website.
Our technicians looked into the problem, but his SSI code seemed fine and it had been working for a long period of time already. After digging deeper, our technicians discovered where the problem was stemming from – he was using an older SSI syntax.
This syntax was no longer supported by default by the Apache web server, as of version 2.3.13+.
The fix for this problem was quite simple – all that had to be done was the addition of the SSILegacyExprParser directive into the .htaccess file:
This small line fixed the problem immediately because it helped re-start the old SSI parser without needing to re-write the whole code.
For sites made by developers who keep up with the times, there shouldn’t be any problem.
However, if you discover that your website is having problems with SSI elements that stop working all of a sudden, then you will know what to do.
Common uses of SSI on websites:
- A single Page header file (including a page source comment)
- Conditional generation of CSS in-line data (depending on browser variables)
- News sections on certain pages
- Left-hand navigation on certain pages
- Right-hand navigation on certain pages
- Standard footers on all pages (including copyright and page modified dates)
- Printer-friendly pages using conditionally generated CSS