预览模式: 普通 | 列表

Wordpress - IIS伪静态规则

这是适用于IIS7及以上的Wordpress的伪静态规则,保存成web.config文件,放到网站根目录即可。
<?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>

Tags: wordpress php

分类:技术文章 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 702

 广告位

↑返回顶部↑