[英]IIS rewrite rule to redirect multiple domains to different apps on same site
I am new to IIS rewrite rules and need help with writing rules that will do the following: 我是IIS重写规则的新手,并且在编写将执行以下操作的规则方面需要帮助:
For example: 例如:
https://domain1.com -> redirect to https://domain1.com/Portal https://domain1.com- >重定向到https://domain1.com/Portal
https://dm1.com --> redirect to https://dm1.com/Portal https://dm1.com- >重定向到https://dm1.com/Portal
https://domain2.com --> redirect to https://domain2.com/Client https://domain2.com- >重定向到https://domain2.com/Client
https://dm2.com --> redirect to https://dm2.com/Client https://dm2.com- >重定向到https://dm2.com/Client
IIS Site: IIS站点:
Default Web Site 默认网站
if you have few web sites, not just one web site with few bindings, than it could be done by using: 如果您只有少数几个网站,而不仅仅是一个绑定很少的网站,那么可以使用以下方法完成此操作:
1) HTTP redirect in IIS 1)IIS中的HTTP重定向
2) by using default.asp
page with Response.Redirect
command 2)通过将
default.asp
页与Response.Redirect
命令一起使用
3) by using IsapiRewrite
DLL's. 3)通过使用
IsapiRewrite
DLL。 RewriteRule ^/ /Portal
4) IIRF (just modern(?) version of IsapiRewrite
) 4)IIRF(
IsapiRewrite
版本(?)
even if you have one web site with few bindings it could be done by using method #2 & #3... of course method #2 and #3 must be adjusted in this case. 即使您的网站绑定很少,也可以使用方法#2和#3 ...进行操作,当然在这种情况下必须调整方法#2和#3。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.