YII 伪静态 IIS7 方法 web.config

时间:2022-03-29 02:33:05

YII 伪静态 IIS7 方法 web.config

 

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Main Rule" stopProcessing="true">
<match url="^(.*/)*filename"/>
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType = "IsFile" negate="true"/>
<add input="{REQUEST_FILENAME}" matchType = "IsDirectory" negate="true"/>
</conditions>
<action type="Rewrite" url="/xiweicrm/index.php"/>
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

  

<match url="^(.*/)*filename"/>
注意把filename 改成对应的yii目录地址,我的这个是把YII嵌套到另一个程序里边了