【发布时间】:2019-09-03 13:35:29
【问题描述】:
只是一个简单的问题。 我有一个域 website.com,并且这个页面有以国家代码命名的特定页面。
- website.com/英国
- website.com/fr
- website.com/我们
- ...
我已经在我的 web.config 文件上创建了规则,并使用以下 URl 重写:
<rule name="RewriteUserFriendlyURL1" stopProcessing="true">
<match url= "^([^/]+)/?$"/>
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="ContactUs.php?lang={R:1}" />
</rule>
页面是在 PHP 中生成的,名为 lang 的变量用于显示选择的页面并存在于 URL 中。
我想在我的域和页面之间添加 "contact/"。
- website.com/联系方式/uk
- website.com/contact/fr
- ...
我有以下规则:
<rule name="RewriteUserFriendlyURL1" stopProcessing="true">
<match url="contact([^/]+)/?$"/>
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="ContactUs.php?lang={R:1}"/>
</rule>
任何人都可以向我解释我不明白的地方, 谢谢
【问题讨论】:
标签: azure iis web-config