我使用在我的ISS服务器上获得简单的cms(实际上必须使用ISS)并且有一个插件可以在国际空间站上用web.config
进行重写。匹配URL在IIS 7上的子文件夹regexp与web.config
的web.config来源:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="GetSimple Fancy URLs" stopProcessing="true">
<match url="^([^/]+)/?$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="?id={R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
,但我的CMS两个主文件夹/
和子文件夹/en
如:
http://domainname.com/(主CMS) http://domainname.com/en/(另一个在子文件夹CMS)
与上述web.config
,成功地工作,但主要CMS上的子文件夹CMS不工作(给404之前那样)
我如何可以实现子文件夹规则web.config file
?所以2 cms成功地工作。
我试图把相同的web.config文件下的子文件夹(/en
),但没有奏效。
非常感谢,