如何从IIS URL的末尾删除:port号? [英] How to remove the :port number from the end of an IIS URL?

查看:91
本文介绍了如何从IIS URL的末尾删除:port号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在IIS中,我注意到当您使用默认端口(http使用 80 ,https使用 443 )时,端口号未显示在URL的末尾在您的浏览器中.但是,如果您使用其他端口,则会显示 .

In IIS, I noticed when you use the default ports (80 for http and 443 for https) the port number doesn't display at the end of the URL in your browser. However, if you use a different port it will display.

示例: 默认端口生成链接: http://www.example.com

Example: Default port generates link: http://www.example.com

自定义端口生成链接: http://www.example.com:8301

Custom port generates link: http://www.example.com:8301

是否可以更改设置以使端口(在这种情况下为:8301 )在不使用默认值的情况下不显示?

Is there a setting you can change to make the port (in this case, :8301) not display without using the defaults?

推荐答案

80是HTTP连接的默认端口. http://example.com = http://example.com:80

80 is a default port for HTTP connections. http://example.com = http://example.com:80

443是HTTPS连接的默认端口. https://example.com = https://example.com:443

443 is a default port for HTTPS connections. https://example.com = https://example.com:443

如果您托管在其他端口上,则必须将其包含在URL中.
这不是IIS规则-通常是关于HTTP的.您不能以 http://example.com 可以在端口8301上运行的方式配置服务器,并且我无法想象在任何情况下都可以有用.我坚信默认情况下,在浏览器端选择80端口,而在服务器端未分配.

If you are hosting on an other port, you have to include it in the URL.
It's not a IIS rule - it's about HTTP in general. You cannot configure the server in such way that http://example.com will work with port 8301 and I can't imagine any situation when it can be useful. I strongly believe that 80 port is chosen by default on a browser-side but not assigned on a server-side.

如果您希望用户通过http://example.com URL访问该网站,并且该页面必须是主页,则交换您的8301和80端口WebSite的绑定.

If you want users to reach this website by http://example.com URL and it must be a main page then swap your 8301 and 80 ports WebSites' bindings.

这篇关于如何从IIS URL的末尾删除:port号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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