Skip to content

非公式 / UnofficialCloudflare, Inc. 非提携。アカウント情報は入力しないでください。Not affiliated with Cloudflare, Inc. Do not enter Cloudflare credentials here.Official docsこのサイトについてプライバシー

管理画面へのリクエストを HTTPS へリダイレクトする

store.example.com の管理画面へのリクエストを HTTPS へリダイレクトし、元のパスとクエリ文字列を保つリダイレクトルールを作成します。

最終更新 Markdown で表示Agent セットアップ

この例は、ゾーン example.com のシングルリダイレクトです。特定サブドメイン(store.example.com)の管理画面へのリクエストを HTTPS へリダイレクトし、元のパスとクエリ文字列を保ちます。

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

  • Wildcard pattern
    • Request URL: http://store.example.com/admin*

その場合

  • Target URL: https://store.example.com/admin${1}
  • Status code: 301
  • Preserve query string: 有効

たとえば、このリダイレクトルールは次のようにリダイレクトします。

リクエスト URL ターゲット URL ステータスコード
http://store.example.com/admin/products/ https://store.example.com/admin/products/ 301
https://store.example.com/admin/products/ (変更なし) n/a
http://store.example.com/admin/?logged_out=true https://store.example.com/admin/?logged_out=true 301
http://store.example.com/?all_items=true (変更なし) n/a
http://example.com/admin/ (変更なし) n/a

役に立ちましたか?