コンテンツにスキップ

異なるホスト名へのリクエストをリダイレクト

\smallshop.example.com\へのすべてのリクエストをHTTPSを使用して異なるホスト名にリダイレクトするリダイレクトルールを作成し、元のパスとクエリ文字列を保持します。

この例の単一リダイレクトは、smallshop.example.comへのすべてのリクエストを異なるホスト名globalstore.example.netにHTTPSを使用してリダイレクトし、元のパスとクエリ文字列を保持します。

受信リクエストが一致する場合

  • ワイルドカードパターン
    • リクエストURL: http*://smallshop.example.com/*

その場合

  • ターゲットURL: https://globalstore.example.net/${2}
  • ステータスコード: 301
  • クエリ文字列を保持: 有効

例えば、リダイレクトルールは以下のリダイレクトを実行します:

リクエストURLターゲットURLステータスコード
http://smallshop.example.com/https://globalstore.example.net/301
http://smallshop.example.com/admin/?logged_out=truehttps://globalstore.example.net/admin/?logged_out=true301
https://smallshop.example.com/?all_items=1https://globalstore.example.net/?all_items=1301
http://example.com/about/(変更なし)n/a