URL 重定向的源 URL 与目标 URL 支持不同的 URL 组件。
参考表中提供的 URL 组件示例基于以下 URL:
https://user:[email protected]:443/search?q=term#results| URL 组件 | 在源 URL 中支持 1 | 在目标 URL 中支持 |
|---|---|---|
| Scheme 例如: https |
是,仅 http 或 https(可选) |
是 |
| User information 例如: user:password |
否 | 是(可选) |
| Host 例如: www.example.com |
是 | 是(可选) |
| Port 例如: 443 |
否 | 是(可选) |
| Path 例如: /search |
是 | 是 |
| Query string 例如: q=term |
否 | 是,如果 Preserve query string(保留查询字符串) 为 false(可选)仅当你不保留原始查询字符串(即 Preserve query string(保留查询字符串) 为 false)时,才能向目标 URL 添加查询字符串。如果将 Preserve query string(保留查询字符串) 设为 true,则在 匹配源 URL 的重定向时,请求的查询字符串会被传递。 |
| Fragment 例如: results |
否 | 是(可选) |
Bulk Redirects 也支持不含 authority 组件 2 的目标 URL,例如以下 URL:
magnet:?xt=urn:btih:2bd9d334e8d1e5bd7768755173222db5c6dea13b&dn=archlinux-2021.07.01-x86_64.iso