📋
SaveYourTime
  • SaveYourTime - Coding Notes
  • Front-End
    • Next.js - Set up with TypeScript
  • Backend
    • Install MySQL on Ubuntu
    • Setup Certbot with route53 on Ubuntu 20.04
    • Configure a Nginx HTTPS Reverse Proxy
    • TypeORM - How to seed data with typeorm-seeding 🔥
  • React Native
    • React Native - Facebook Login
    • React Native - Adding a new Swift file and a Bridge header
  • Tools
    • ESLint
    • Prettier
  • Amazon Web Services
    • AWS - Deploy Next.js Application to AWS S3
    • AWS - Deploy Nest.js Server to Elastic Beanstalk
    • AWS - Setup AWS CloudFront
    • AWS - Configure HTTPS for CloudFront with GoDaddy Domain
    • AWS - Configure HTTPS for Elastic Beanstalk Environments with GoDaddy Domain
    • AWS - Fix Next.js static site hosted on S3 CloudFront routing fails on page reload
    • AWS - Running Puppeteer on AWS EC2
    • AWS - Running Metabase on AWS Elastic Beanstalk
  • GitHub Actions
    • Github - Deploying a React Next.js App to AWS S3 with Github Actions
    • Github - Deploying a Nest.js App to AWS Elastic Beanstalk (Docker Platform) with Github Actions
    • Github - Deploying a Nest.js App to AWS Elastic Beanstalk (Node.js Platform) with Github Actions
  • Others
    • Using Fastlane to automate beta deployments and releases for your iOS and Android apps
    • NodeBB
Powered by GitBook
On this page
  • Duplicate files without .html extension
  • Set explicit content type for any guessed mime types

Was this helpful?

  1. Amazon Web Services

AWS - Fix Next.js static site hosted on S3 CloudFront routing fails on page reload

PreviousAWS - Configure HTTPS for Elastic Beanstalk Environments with GoDaddy DomainNextAWS - Running Puppeteer on AWS EC2

Last updated 4 years ago

Was this helpful?

Duplicate files without .html extension

find ./out -type f -name '*.html' | while read HTMLFILE; do
  BASENAME=${HTMLFILE##*/};
  FILENAME=${BASENAME%.*};
  if [[ "$FILENAME" != "index" ]];
  then
    cp ${HTMLFILE} ./out/${FILENAME};
  fi
done

Set 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/html

S3 static pages without .html extensionStack Overflow
next.js export static - S3 - routing fails on page reloadStack Overflow
How to fix nextjs cloudfront static assets respond with 403?Stack Overflow
[feature request] AWS support · Issue #5784 · vercel/next.jsGitHub
How to create statically generated, serverless site with NextJS, AWS CloudFront and Terraform - Sosnowski.devSosnowski.dev - Personal Blog
Logo
Logo
Logo
Logo
Logo