http url 中的加号是什么意思? -> http://+:80

发布于 11-28 23:17 字数 386 浏览 1 评论 0原文

可能的重复:
*:80 和 +:80 之间有什么区别

这里的加号到底是什么意思:

netsh http add urlacl url=http://+:80/MyUri user=DOMAIN\user

使用星号 (*) 和加号 (+) 有什么区别?

Possible Duplicate:
What's the difference between *:80 and +:80

What does the plus sign excatly mean here:

netsh http add urlacl url=http://+:80/MyUri user=DOMAIN\user

Whats the difference between using a star (*) and plus (+) ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

帝王念2024-12-05 23:17:43

根据 MSDN 文档,没有任何区别除了两者的解释顺序之外。

为了灵活性和易用性,HTTP Server API 支持四种
指定主机的不同方式。四种主机说明符类别
下面按优先顺序列出:

强通配符(加号)

<块引用>

当 UrlPrefix 的主元素由单个加号组成时
(+),UrlPrefix 匹配上下文中所有可能的主机名
它的方案、端口和relativeURI元素,并且属于强
通配符类别。

当应用程序需要提供服务时,强通配符非常有用
发送到一个或多个relativeURI 的请求,无论如何
这些请求到达机器或它们指定的站点
他们的主机标头。在这种情况下使用强通配符可以避免
需要指定主机和/或 IP 地址的详尽列表。

显式

<块引用>

明确的主机名,例如完全限定的域名
host 元素将 UrlPrefix 放置在显式类别中。这种
host 元素直接与传入的 Host 标头匹配
请求。

显式主机规范对于多站点应用程序非常有用
例如根据不同的情况提供不同内容的 Web 服务器
请求定向到的站点。

IP 绑定弱通配符

<块引用>

当 IP 地址作为主机元素出现时,则 UrlPrefix
属于 IP 绑定弱通配符类别。这种UrlPrefix
与指定 IP 接口的任何主机名匹配
指定的方案、端口和relativeURI,并且尚未被指定
由强通配符或显式 UrlPrefix 匹配。 IP地址
在宿主元素中采用两种形式之一:

IPv4 文字字符串

<块引用>

IPv4 文字由四个点分十进制数字组成,每个数字位于
范围0-255,例如192.168.0.0。

IPv6 文字字符串

<块引用>

IPv6 文字字符串括在方括号中并包含十六进制
用冒号分隔的数字;例如:[::1] 或
[3ffe:ffff::6ECB:0101]。

IP 绑定弱通配符主机说明符适用于应用程序
根据传入的路线改变他们提供的内容
请求。不要依赖 IP 绑定的弱通配符主机说明符
加强安全。

弱通配符(星号)

<块引用>

当星号 (*) 作为宿主元素出现时,则 UrlPrefix
属于弱通配符类别。这种UrlPrefix匹配
与指定方案、端口和关联的任何主机名
尚未与强通配符匹配的relativeURI,
显式或 IP 绑定弱通配符 UrlPrefix。

此主机规范可以在某些情况下用作默认包罗万象
情况下,或者可以用来指定一大段URL
名称空间,而不必使用许多 UrlPrefixes。

According to the MSDN documentation, there isn't any difference except for the order in which the two are interpreted.

For flexibility and ease of use, the HTTP Server API supports four
different ways to specify hosts. The four host-specifier categories
are listed below in order of precedence:

Strong wildcard (Plus Sign)

When the host element of a UrlPrefix consists of a single plus sign
(+), the UrlPrefix matches all possible host names in the context of
its scheme, port and relativeURI elements, and falls into the strong
wildcard category.

A strong wildcard is useful when an application needs to serve
requests addressed to one or more relativeURIs, regardless of how
those requests arrive on the machine or what site they specify in
their Host headers. Use of a strong wildcard in this situation avoids
the need to specify an exhaustive list of host and/or IP-addresses.

Explicit

An explicit host name such as a fully qualified domain name in the
host element places a UrlPrefix in the explicit category. This kind of
host element is matched directly against the Host headers of incoming
requests.

Explicit host specifications are useful for multi-site applications
such as Web servers that deliver different content depending on the
site to which the request was directed.

IP-bound weak wildcard

When an IP address appears as the host element, then the UrlPrefix
falls into the IP-bound Weak Wildcard category. This kind of UrlPrefix
matches any host name for the specified IP interface with the
specified scheme, port and relativeURI, and that has not already been
matched by a strong-wildcard or explicit UrlPrefix. The IP address
takes one of two forms in the host element:

IPv4 Literal String

An IPv4 literal consists of four dotted decimal numbers, each in the
range 0-255, such as 192.168.0.0.

IPv6 Literal String

An IPv6 literal string is enclosed in square brackets and contains hex
numbers separated by colons; for example: [::1] or
[3ffe:ffff::6ECB:0101].

IP-bound weak-wildcard host specifiers are intended for applications
that vary the content they serve based on the route taken by incoming
requests. Do not rely on IP-bound weak-wildcard host specifiers to
enforce security.

Weak wildcard (asterisk)

When an asterisk (*) appears as the host element, then the UrlPrefix
falls into the weak wildcard category. This kind of UrlPrefix matches
any host name associated with the specified scheme, port and
relativeURI that has not already been matched by a strong-wildcard,
explicit, or IP-bound weak-wildcard UrlPrefix.

This host specification can be used as a default catch-all in some
circumstances, or can be used to specify a large section of URL
namespace without having to use many UrlPrefixes.

浅暮の光2024-12-05 23:17:43

您可以在此处找到定义:UrlPrefix Strings< /a>

对于 +

强通配符(加号)

当 UrlPrefix 的主机元素由单个加号 (+) 组成时,UrlPrefix 会匹配其方案、端口和relativeURI 元素上下文中的所有可能的主机名,并属于强通配符类别。

当应用程序需要处理发送到一个或多个relativeURI 的请求时,强通配符非常有用,无论这些请求如何到达计算机或它们在主机标头中指定的站点。在这种情况下使用强通配符可以避免指定主机和/或 IP 地址的详尽列表。

而对于*

弱通配符(星号)

当星号 (*) 作为宿主元素出现时,则 UrlPrefix 属于弱通配符类别。这种 UrlPrefix 匹配与指定方案、端口和相对 URI 关联的任何主机名,这些主机名尚未与强通配符、显式或 IP 绑定的弱通配符 UrlPrefix 匹配。

在某些情况下,此主机规范可以用作默认的包罗万象,或者可以用于指定大部分 URL 命名空间,而不必使用许多 UrlPrefix。

You can find the definition here: UrlPrefix Strings

For the +

Strong wildcard (Plus Sign)

When the host element of a UrlPrefix consists of a single plus sign (+), the UrlPrefix matches all possible host names in the context of its scheme, port and relativeURI elements, and falls into the strong wildcard category.

A strong wildcard is useful when an application needs to serve requests addressed to one or more relativeURIs, regardless of how those requests arrive on the machine or what site they specify in their Host headers. Use of a strong wildcard in this situation avoids the need to specify an exhaustive list of host and/or IP-addresses.

And for the *

Weak wildcard (asterisk)

When an asterisk (*) appears as the host element, then the UrlPrefix falls into the weak wildcard category. This kind of UrlPrefix matches any host name associated with the specified scheme, port and relativeURI that has not already been matched by a strong-wildcard, explicit, or IP-bound weak-wildcard UrlPrefix.

This host specification can be used as a default catch-all in some circumstances, or can be used to specify a large section of URL namespace without having to use many UrlPrefixes.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文