Server-side includes stopped working

Website URL

tdsd.great-site.net

Error Message

Hi, I have been using Server Side Includes on my website since I launched it, and today I got an .htaccess error, stating I needed to fix my .htaccess file. The file contents are below:

Options +Includes
AddType text/html html txt
AddHandler server-parsed html txt
SSILegacyExprParser off
php_value display_errors On

This was last updated on 5/14. I am able to get my website to load by commenting out the +Includes line, but since the site was built on includes it’s broken for the moment (either until Includes work again or I migrate everything to php includes).

Is the restriction on SSI a bug or is it a purposeful change to server settings?

Thanks for your help! Full error below:

"Something Went Wrong!

Our apologies, but the website has encountered an error and cannot display this page at the moment.

The issue is likely due to a code error within the .htaccess file, which controls important server configurations. This error is not related to any PHP files or other website code.
How to Debug the .htaccess Error:

If you have access to the website’s files, please follow these steps to identify and resolve the problem:

Access Your .htaccess File: Use an FTP client or your hosting provider's file manager to locate the .htaccess file in the root directory of your website (or the specific directory where the error is occurring).
Check for Recent Changes: If you have recently edited the .htaccess file, the error is likely within your latest modifications.
Comment Out Recent Lines: To isolate the error, try commenting out the lines you've recently added or modified. You can comment out a line by adding a # symbol at the beginning of the line. For example:
# RewriteEngine On
# RewriteRule ^old-page\.html$ new-page.html [L]
Test After Each Change: After commenting out a section, save the .htaccess file and try to reload the webpage that was showing the error. If the error disappears, the problem lies within the commented-out section.
Carefully Review the Code: Examine the syntax and logic of the code within your .htaccess file. Look for typos, missing characters (like brackets or quotes), or incorrect directives. Refer to the Apache .htaccess documentation for correct syntax.
Revert to a Previous Version: If you have a backup of your .htaccess file from a time before the error occurred, try reverting to that version.

Once the problematic code in the .htaccess file is corrected or removed, the website should return to normal.

Thank you for your patience."


Looks to be working now, so was probably just a temporary blip

No, that’s missing most of the content (I commented out includes). Those are just the parts I’ve failed to fully modularize :slight_smile:

The body of the page looks like this (filepaths redacted):
<body>
<div id="heading">
<!--#include virtual="[filepath]" -->
</div>
<div class="mainlayout">
<div class="content" id="jump">
<!--#include virtual="[filepath]" -->
</div>
<div class="imagebox">
<a href="#jump"><img src="[filepath]" class="image"></a>
<div class="captions">
This will make more sense once it's the American coast.
</div>
</div>
<div class="secondary">
<h2>Tech Tip</h2>
<!--#include virtual="[filepath]" -->
</div>
<div class="aux">
<!--#include virtual="[filepath]" -->
</div>
</div>
</body>

Some updates were done on the servers yesterday, and I think they may have broken SSI.

I’ll ask about it upstream, but as far as I know, SSI was never a supported feature in the first place, and was probably enabled by accident. Regardless of the outcome, you may want to consider migrating from SSI to PHP for the best compatibility.

Ok, thanks! It would be nice if SSI is re-enabled to give some time to migrate to PHP while keeping the site running, but I understand if not.

I just received confirmation: SSI was disabled on purpose for security and will not be enabled again. I’m sorry for the trouble caused, but you’ll need to replace the code with PHP to make your site work again.

Bummer. Thanks for looking into it and following up though, I do appreciate it.