>我有多个域名指向同一服务器(example.nl(
example.my URL 应指向 example.nl/en 的内容,而不让此 URL 显示在地址栏中。这只对主页来说是真正必要的(由于谷歌addwords问题(。
总而言之,example.my 应该在地址栏中显示 example.my 时显示 example.nl/en 的内容。
当前的规则给了我一个错误。有什么提示吗?
<rule name="Redirect .my" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^.*example.my$" />
</conditions>
<action type="Rewrite" url="http://www.example.nl/en/" />
</rule>
这似乎为我做了一个技巧:
<rule name="redirect .my to /en" enabled="true" stopProcessing="true">
<match url="(^$)" ignoreCase="true" />
<conditions>
<add input="{HTTP_HOST}" pattern="example.my" />
</conditions>
<action type="Redirect" url="http://www.example.my/en/{R:1}" appendQueryString="true" />
</rule>