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
206 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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
• 5,980 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,360 points
62 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,250 points
312 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
251 views
+13 votes
2 answers
+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,300 points
254 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
• 5,980 points
26 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.