So after setting up a few S3 hosted sites what happens if you want to move your site to another place. Say, you want to host the site over on an EC2 instance but you've already handed out the long url to your S3 bucket. It may be useful to have a redirect setup on the S3 bucket. Here is how to set that up.
Remove all your files except for the index.html
. Then edit the index.html
and remove all of it's content except the most basic of html. This is just so you don't have anything left of your site in the bucket.
Click on the index.html
file and then click on Properties and follow that with a click on the Metadata box.
Here you want to add a key. Select Add Key and then select Website-Redirect-Location
. For the value enter the url you'd like to redirect o.