0

I'm uploading Gatsby static built files to s3 static website hosting in subdir.

For example.

test.s3-website-us-west-2.amazonaws.com/site1 test.s3-website-us-west-2.amazonaws.com/site2

So I want to access site 1 using url test.s3-website-us-west-2.amazonaws.com/site1 this open frontpage of that site. It works fine till here. But frontpage contains some urls like http://test.s3-website-us-west-2.amazonaws.com/site1/new-post. When I click on link http://test.s3-website-us-west-2.amazonaws.com/site1/new-post the url returns 404 and Url redirects to http://test.s3-website-us-west-2.amazonaws.com/new-post causing it to 404. How we can fix on s3 end is any way to fix on s3 end only or only proxy and Cloudfront is option?

Can we fix using s3 redirect rule?

2
  • Do you have an index.html under site1/new-post? Commented May 8, 2020 at 19:30
  • Yes I have index.html in sub directory. Commented May 9, 2020 at 3:05

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.