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,790 points
2,429 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,290 points

Related Questions In AWS

+1 vote
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,640 points
511 views
+6 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,660 points
4,660 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,150 points
5,072 views
+15 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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
1,875 views
+1 vote
2 answers

AWS CloudWatch Logs in Docker

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

answered Sep 7, 2018 in AWS by bug_seeker
• 15,530 points
1,232 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,290 points
689 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP