跳转到内容
搜索文档

Bulk Redirects 中支持的 URL 组件

最后更新 查看 MarkdownAgent 设置

URL 重定向的源 URL 与目标 URL 支持不同的 URL 组件。

参考表中提供的 URL 组件示例基于以下 URL:

https://user:password@www.example.com:443/search?q=term#results
URL 组件 在源 URL 中支持 1 在目标 URL 中支持
Scheme
例如:
https
是,仅 httphttps
(可选)
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

Footnotes

  1. 在源 URL 中支持 = 表示你不能在源 URL 中包含该组件以匹配传入请求的 URL。

  2. URL authority 是用户信息、主机与端口组件的组合。

这篇文档对您有帮助吗?