此 zone 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 |