简体   繁体   English

是否可以在IIS6 / 7上的ASP.Net中更改请求的主机名?

[英]Is it possible to change the HostName for a request in ASP.Net on IIS6/7?

Is it possible to change the HostName for a request in ASP.Net? 是否可以在ASP.Net中更改请求的主机名? We need this for rewriting all requests to abc.xyz.com to abc.xyz.com/sites/abc (we are running Sharepoint). 我们需要这样做,以便将对abc.xyz.com的所有请求重写为abc.xyz.com/sites/abc(我们正在运行Sharepoint)。
I understand this is possible with ISAPI. 我了解使用ISAPI可以实现。 We are running IIS7. 我们正在运行IIS7。

I would say you need to use something like ISA Server or possibly Squid which is the user facing gateway to your sharepoint installation. 我要说的是,您需要使用ISA ServerSquid之类的东西,这是用户面对您的Sharepoint安装的网关。

What you're trying to do is definately possible in ISA Server. 您试图做的事情肯定在ISA Server中是可能的。 (I do that on my installation.). (我在安装时执行此操作。)。

Yes I believe it is possible to do that. 是的,我相信这样做是可能的。 See the following link . 请参阅以下链接 You can use http://urlrewriter.net/ to perform that task. 您可以使用http://urlrewriter.net/执行该任务。 You will need to learn URLRewrite in order to make this work though. 不过,您将需要学习URLRewrite才能使它起作用。

In order to use this in IIS 7 you will need the URLRewrite Module which can be found here . 为了在IIS 7中使用此功能,您将需要URLRewrite模块,可以在此处找到它。

是的,您可以在IIS 7中使用URL重写模块

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM