如何将主应用程序的目录映射为另一个域



我想设置www.domain.com/folderfolder.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>

最新更新