この例では、英国からのすべてのウェブサイト訪問者を別ドメインへリダイレクトします。同じパスの機能はそのまま残します。
-
次の URL リダイレクトを持つ、
uk_redirect_listという名前の Bulk Redirect List を作成します。- Source URL:
https://example.com/ - Target URL:
https://example.co.uk/ - Subpath matching: Enabled
- Preserve query string: Enabled
- Source URL:
-
先の Bulk Redirect List を有効にする Bulk Redirect Rule を作成し、ルール式を次に設定します。
ip.src.country == "GB" and http.request.full_uri in $uk_redirect_list
この設定は、英国からの訪問者に対して次のリダイレクトを行います。
| リクエスト URL | リダイレクト後の URL |
|---|---|
https://example.com/ |
https://example.co.uk/ |
https://example.com/my/path/to/page.htm |
https://example.co.uk/my/path/to/page.htm |
https://example.com/search?q=term |
https://example.co.uk/search?q=term |