S3 Static Website Hosting Route All Paths to Index.html

0 votes

Okay I have an S3 storage service which I use to host a javascript application that will use HTML5 pushStates. But if the user bookmarks these URLs, it will not resolve to anything. Can we take all url requests and serve up the root index.html in S3 bucket, without doing a full re direct. Then my javascript application could parse the URL and serve the proper page.

Can we make S3 serve the index.html for all URL requests instead of doing redirect?

Apr 8, 2018 in AWS by hemant
• 5,750 points
419 views

1 answer to this question.

0 votes

Yes there is an easy way to deal with your issue. In your bucket properties in the Error Document just use the same file as the Index Document.

You may use JavaScript frameworks like AngularJS etc, these frameworks will help you support page refresh completely.

answered Apr 8, 2018 by code_ninja
• 6,220 points

Related Questions In AWS

0 votes
1 answer

Hosting static website with AWS S3 and Route 53

Add an additional bucket called myblog.com and ...READ MORE

answered Dec 4, 2018 in AWS by Archana
• 5,560 points
86 views
+5 votes
3 answers
0 votes
1 answer

Directory Listing in S3 Static Website

There is also a solution: https://github.com/caussourd/aws-s3-bucket-listing Similar to https://github.com/rgrp/s3-bucket-listing but I couldn't ...READ MORE

answered Jul 18, 2018 in AWS by Cloud gunner
• 4,260 points
501 views
0 votes
1 answer

Is it possible to find all S3 buckets given a prefix?

The high level collection command s3.buckets.filter only ...READ MORE

answered Aug 27, 2018 in AWS by Archana
• 4,090 points
571 views
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
145 views
+1 vote
2 answers

AWS CloudWatch Logs in Docker

The awslogs works without using ECS. you need to configure ...READ MORE

answered Sep 6, 2018 in AWS by bug_seeker
• 15,350 points
326 views
0 votes
1 answer

Adding Keypair to existing EC2 instance

No you can't. The reason is KeyPair ...READ MORE

answered Apr 8, 2018 in AWS by code_ninja
• 6,220 points
41 views