我想设置www.domain.com/folder
为folder.domain.com
。
在你的网页中添加以下规则。配置文件-
<system.webServer>
<rewrite>
<rules>
<rule name="FolderSubDomain" stopProcessing="false">
<match url="(.*)" />
<conditions>
<add input="{HTTP_HOST}" pattern="^(?!www)(w+).domain.com$" />
</conditions>
<action type="Rewrite" url="{C:1}/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>