Skip to content

非公式本サイトは非公式の日本語ドキュメントであり、Cloudflare 公式サイトではありません。最新情報はdevelopers.cloudflare.comをご確認ください。

訪問者を新しいページ URL へリダイレクトする

/contact-us/ から新しいパス /contacts/ へ訪問者を送るリダイレクトルールを作成します。

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

ゾーン example.com 向けのこの静的リダイレクトは、/contact-us/ ページをリクエストした訪問者を、新しいページ URL /contacts/ へ送ります。

When incoming requests match

  • Field: URI Path
  • Operator: equals
  • Value: /contact-us/

Expression Editor を使う場合は、次の式を入力します。
http.request.uri.path eq "/contact-us/"

Then

  • Type: Static
  • URL: /contacts/
  • Status code: 301
  • Preserve query string: Enabled

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

リクエスト URL 対象 URL ステータスコード
example.com/contact-us/ example.com/contacts/ 301
example.com/contact-us/?state=TX example.com/contacts/?state=TX 301
example.com/team/ (変更なし) n/a

役に立ちましたか?