http网址中的加号是什么意思? -> http://+:80 [英] What does a plus sign mean in a http url? -> http://+:80

查看:492
本文介绍了http网址中的加号是什么意思? -> http://+:80的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

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

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

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

推荐答案

根据

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

为了提高灵活性和易用性,HTTP Server API支持四个 指定主机的不同方法.四个主机指定者类别 在优先级下方列出:

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:

当UrlPrefix的host元素由单个加号组成时 (+),UrlPrefix在以下情况下匹配所有可能的主机名: 它的方案,端口和relativeURI元素,并归结为强 通配符类别.

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.

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

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

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

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.

明确的主机规范对于多站点应用程序很有用 例如根据具体情况提供不同内容的Web服务器 请求定向到的站点.

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绑定弱通配符

IP-bound weak wildcard

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

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文字字符串

IPv4 Literal String

IPv4文字包含四个点分十进制数字,每个数字在 范围为0-255,例如192.168.0.0.

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

IPv6文字字符串

IPv6 Literal String

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

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绑定的弱通配符主机说明符旨在用于应用程序 会根据传入邮件采取的路线来改变其提供的内容 要求.不要依赖IP绑定的弱通配符主机说明符来 加强安全性.

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)

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

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.

在某些情况下,此主机规范可以用作默认的全部内容 情况,或可用于指定较大的网址部分 命名空间,而不必使用许多UrlPrefixes.

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.

这篇关于http网址中的加号是什么意思? -> http://+:80的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆