URL重写另一个子域

问题描述 投票:0回答:1

我想创建一个URL重写规则发送:

www.mycompany.com/file.aspx?someQueryString 要么 www.mycompany.com/fileXYZ.aspx?someQueryString

www.subdomain.mycompany.com/file.aspx?someQueryString 要么 www.subdomain.mycompany.com/fileXYZ.aspx?someQueryString

我写这条规则:

<rule name="MyPageRewrite" stopProcessing="true"> <match url="(.*)(file[a-zA-Z]*\.aspx)" /> <action type="Rewrite" url="http://subdomain.mycompany.com/{R:1}" /> </rule>

本场比赛表现似乎工作,但目标不?怎么了?

asp.net iis url-rewriting
1个回答
0
投票

谢谢李莱克斯,我与你提供的,发现一条规则,测试aspx文件多次试验:

<rule name="MyPageRewrite" stopProcessing="true">
   <match url="(.*)(file[a-zA-Z]*\.aspx)" />
   <action type="Redirect" redirectType="Found" url="http://subdomain.mycompany.com/{R:0}" appendQueryString="true"/> 
</rule>
© www.soinside.com 2019 - 2024. All rights reserved.