gpt4 book ai didi

iis - 如何在IIS中的主机头中允许尾随点

转载 作者:行者123 更新时间:2023-12-04 08:30:11 25 4
gpt4 key购买 nike

我正在运行一个IIS 7.5站点,该站点提供的内容http://www.foo.com/

我被要求正确地路由 http://www.foo.com./ (注意尾随点)。如果您现在点击该页面,则会出现IIS错误:

Bad Request - Invalid Hostname

HTTP Error 400. The request hostname is invalid.



即使对于 http://www.microsoft.com也会发生这种情况。 我已经看到一些站点成功完成了路由尾随期(例如 http://www.amazon.com./ ),但是看起来大多数站点都在使用Apache,而不是IIS。

我在IISt中为 www.foo.com添加了一个主机头。 这是允许的。但是,它不会让您启动站点。它不会启动,并弹出一个消息框,内容为:

Value does not fall within the expected range.



有谁知道如何在IIS中使用尾随点来提供域名?

最佳答案

尾随点是主机名中绝对合法的部分-只是它通常是不可见的,因为它在DNS中是隐式的。如果存在尾随点,则称为“完全合格”域名(FQDN)。

请注意,在线DNS上始终以FQDN进行交易。

RFC 3976(URI语法的定义)的第3.2.2节说(我的重点):

A host identified by a registered name is a sequence of characters usually intended for lookup within a locally defined host or service name registry, though the URI's scheme-specific semantics may require that a specific registry (or fixed name table) be used instead. The most common name registry mechanism is the Domain Name System (DNS). A registered name intended for lookup in the DNS uses the syntax defined in Section 3.5 of [RFC1034] and Section 2.1 of [RFC1123]. Such a name consists of a sequence of domain labels separated by ".", each domain label starting and ending with an alphanumeric character and possibly also containing "-" characters. The rightmost domain label of a fully qualified domain name in DNS may be followed by a single "." and should be if it is necessary to distinguish between the complete domain name and some local domain.



向MS提交错误报告。

关于iis - 如何在IIS中的主机头中允许尾随点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3314192/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com