AWS - Fix Next.js static site hosted on S3 CloudFront routing fails on page reload
Duplicate files without .html extension
.html extensionfind ./out -type f -name '*.html' | while read HTMLFILE; do
BASENAME=${HTMLFILE##*/};
FILENAME=${BASENAME%.*};
if [[ "$FILENAME" != "index" ]];
then
cp ${HTMLFILE} ./out/${FILENAME};
fi
doneSet explicit content type for any guessed mime types
--content-type text/html
aws s3 sync out s3://woomanpower --acl public-read --follow-symlinks --delete --content-type text/htmlPreviousAWS - Configure HTTPS for Elastic Beanstalk Environments with GoDaddy DomainNextAWS - Running Puppeteer on AWS EC2
Last updated
Was this helpful?