当前位置:首页 > 服务器日常问题 > IIS配置经验 > 正文内容

wordpress适用于Windows IIS伪静态规则文件

xmwl2年前 (2022-07-09)IIS配置经验842

将以下代码另存为 web.config 格式文件,可以直接用记事本新建保存修改扩展名,放到网站根目录中即可生效,提前是服务器支持IIS伪静态组件。

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="WordPress" stopProcessing="true">
<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" appendQueryString="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>


版权声明:
本站资源和文章内容大部分收集于网络,
本站所有资源的版权均属于原作者所有,
本站资源只用于参考学习,请勿直接商用,
若由于商用引起版权纠纷,一切责任均由使用者承担。
若有侵权之处请联系站长我们会第一时间删除

本文由XM技术学习分享发布,如需转载请注明出处。

本文链接:http://xmwl.cc/iis/104.html

标签: IIS配置经验
分享给朋友: