LoginSignup
0
0

More than 5 years have passed since last update.

S3のアクセスを全て他のページに飛ばす

Posted at

あるS3のバケットにリクエストが来た時に、全てのリクエストを
http://hogehoge/fuga.htmlに流したい。

最近S3のWeb Consoleが変わったので自分のために作業メモを残しておく。

Static Website Hostingの設定

スクリーンショット 2017-04-26 17.13.10.png

適当にindex.htmlをアップロードする。
S3のStatic Website Hostingの設定を図のように、errorにもindex.htmlを設定する。

リダイレクトするindex.htmlの設定

スクリーンショット 2017-04-26 17.22.33.png

index.htmlのプロパティを開いて、

「Website-Redirect-Location」のメタデータに飛ばしたいURLhttp://hogehoge/fuga.htmlを設定する。

こうすることによって、エンドポイントのURLにアクセスすると、http://hogehoge/fuga.htmlに飛ぶはず。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0