服务器 发布日期:2024/11/1 浏览次数:1
在网站根目录下加入:
Web.Config:
<"1.0" encoding=”UTF-8″?> <configuration> <system.webServer> <rewrite> <rules> <rule name="cnUrl" stopProcessing="true"> <match url="!^(index\.php|images|assets|robots\.txt)" /> <action type="Rewrite" url="cnurl.php" /> </rule> <rule name="Default" patternSyntax="Wildcard"> <match url="*" /> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> </conditions> <action type="Rewrite" url="index.php" /> </rule> </rules> </rewrite> </system.webServer> </configuration>
cnurl.php:
<"index.php");
支持IIS环境下跑各种开源PHP项目,如:Wordpress、Emlog、Typecho等。