Using server side includes or ssi ,AWS S3
Asked Answered
S

1

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" -->
Scorch answered 28/8, 2013 at 9:38 Comment(0)
G
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.

Glider answered 29/8, 2013 at 6:49 Comment(4)
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.Cranium
With an automated build pipeline this is not a big deal.Teasley
can you clarify what do you mean by "process the files locally" ?Hibernia
@Hibernia 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.Legist

© 2022 - 2024 — McMap. All rights reserved.