web.config不适用于IIS 7.0上的cakephp 2.2.4中的多个应用程序

时间:2013-09-17 08:29:07

标签: php .htaccess cakephp iis-7 web-config

我在cakephp 2.2.4中有两个app文件夹,一个是admin,一个是app

如何为多个app文件夹编写web.config?所以,我的网站就像

一样
1. http://vibrantonline.in/admin
2. http://vibrantonline.in/app

一个用于管理员使用,另一个用于前端。

目前,我使用web.config仅适用于管理员部分,如何更改web.confightaccess,因此它可以为两者工作。

<configuration>
   <system.webServer>
     <rewrite>
       <rules>
         <clear/>
         <rule name="Imported Rule 0" stopProcessing="true">
           <match url="^(img|css|files|js)(.*)$"></match>
           <action type="Rewrite" url="admin/webroot/{R:1}{R:2}" appendQueryString="false"></action>
         </rule>
         <rule name="Imported Rule 1" stopProcessing="true">
           <match url="^(.*)$" ignoreCase="false" />
           <conditions logicalGrouping="MatchAll">
             <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
             <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
           </conditions>
           <action type="Rewrite" url="index.php?url={R:1}" appendQueryString="true" />
         </rule>
         <rule name="Imported Rule 2" stopProcessing="true">
           <match url="^$" ignoreCase="false" />
           <action type="Rewrite" url="/" />
         </rule>
         <rule name="Imported Rule 3" stopProcessing="true">
           <match url="(.*)" ignoreCase="false" />
           <action type="Rewrite" url="/{R:1}" />
         </rule>
         <rule name="Imported Rule 4" stopProcessing="true">
           <match url="^(.*)$" ignoreCase="false" />
           <conditions logicalGrouping="MatchAll">
             <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
             <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
           </conditions>
           <action type="Rewrite" url="index.php?url={R:1}" appendQueryString="true" />
         </rule>
       </rules>
     </rewrite>
   </system.webServer>
 </configuration>

0 个答案:

没有答案
相关问题