9

Is there any way to use ssi on cloudfront or or is it categorized as dynamic content? I would like to have sections like a header, nav or sidebar be able to use one file.

example:i have some html files,they use the same "header" section,i only want to change "header.shtml" and all files will change. The html files sotrge with S3.

enter code here<!--#include virtual="/includes/header.shtml" -->
user2688100
  • 143
  • 2
  • 5

1 Answers1

6

Amazon S3 does not support SSI. All content hosted on S3 is static content.

You could process the files locally before you upload them to S3 and handle any code includes. Then, once you have the final version, just upload that to S3.

dcro
  • 13,294
  • 4
  • 66
  • 75
  • 2
    Which means, every time we save a header and footer, we will regenerate every single page of our whole website that carries that header and footer. – PKHunter Sep 29 '15 at 06:22
  • 1
    With an automated build pipeline this is not a big deal. – SunSparc Nov 10 '17 at 21:41
  • can you clarify what do you mean by "process the files locally" ? – aprajitha Dec 10 '18 at 20:44
  • @aprajitha He means replace the #include parts inside the files with the content of the include files using a script or similar on your local PC and then upload them to S3. – endo64 Dec 24 '18 at 14:04