I have a set of user folders with the same folder structure, but different content, stored in S3.
/user/userA/application/folder/structure/file.xml
/user/userB/application/folder/structure/file.xml
I would like to redirect the user to a fallback folder, (with fallback content) if the s3 folder structure don't exist for that user yet.
/user-fallback/application/folder/structure/file.xml
I've tried to add a wildcard parameter to my Redirection Rules, but S3 is reading *
as a literal
<RoutingRules>
<RoutingRule>
<Condition>
<KeyPrefixEquals>user/*/</KeyPrefixEquals>
<HttpErrorCodeReturnedEquals>404</HttpErrorCodeReturnedEquals>
</Condition>
<Redirect>
<ReplaceKeyPrefixWith>user-fallback/</ReplaceKeyPrefixWith>
</Redirect>
</RoutingRule>
</RoutingRules>
So only urls starting with /user/*/
are being correctly redirected to the user-fallback
folder structure.
I have more than 20 users, so creating individual RoutingRules wouldn't work either (S3 has a routing rule limit)
Any ideas?