Redirect to index.html for S3 subfolder

前端 未结 6 719
庸人自扰
庸人自扰 2020-12-25 12:37

I have a domain example.com. I have a S3 bucket named example.com setup with an index.html file that works. Now I like to create two s

6条回答
  •  有刺的猬
    2020-12-25 13:11

    There is even easier way to accomplish this with an HTML redirect file

    1. Create a plain file named my-great-new-post (don't worry there won't be a name conflict with the folder in the same bucket)

    2. Write a meta-redirect code in that file (I pasted the code below)

    3. upload file to root bucket (where my-great-new-post folder lays)

    4. modify metadata of the new file and make Content-Type:text/html

    Here lays the content of the file:

    
        
        
        
        
        
        
        

提交回复
热议问题