この例は、ゾーン example.com のシングルリダイレクトです。特定サブドメイン(store.example.com)の管理画面へのリクエストを HTTPS へリダイレクトし、元のパスとクエリ文字列を保ちます。
受信リクエストが次に一致する場合
- Wildcard pattern
- Request URL:
http://store.example.com/admin*
- Request URL:
その場合
- 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 |