Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S3 Redirect not accepting 200 #1

Open
nickborti opened this issue Mar 5, 2019 · 2 comments
Open

S3 Redirect not accepting 200 #1

nickborti opened this issue Mar 5, 2019 · 2 comments

Comments

@nickborti
Copy link

nickborti commented Mar 5, 2019

To configure React app on Netlify I used
/* /index.html 200 to redirect to index.html on page reloading for the react router to work.

The S3 Route Builder converted it to

    <RoutingRule>
        <Condition>
            <KeyPrefixEquals>/*</KeyPrefixEquals>
        </Condition>
        <Redirect>
            <ReplaceKeyWith>/index.html</ReplaceKeyWith>
            <HttpRedirectCode>200</HttpRedirectCode>
        </Redirect>
    </RoutingRule>
</RoutingRules>```

But it's not accepting `200`. 

What can be done here?
@AlahmadiQ8
Copy link
Owner

Hello Sagnik :)

Thank you for reporting.

I'm sorry but i don't quite understand. is the generated xml correct and accepted by S3? The generated xml looks correct to me. is it not working?

If it's not correct then this is a bug. I checked aws site and couldn't find an issue with the current xml. Can you double check for me and let me know?

@nickborti
Copy link
Author

@AlahmadiQ8 The generated XML is correct. But the problem is HttpRedirectCode does not take 200 in S3 Redirect Rules. So, if I use /* /index.html 200 that I used on Netlify which is working fine in Netlify, it generates to <HttpRedirectCode>200</HttpRedirectCode> which is incorrect according to S3 routing.

So, this is not working on S3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants