登入WordPress后台
设置—固定连接,选中自定义,填入以下内容
/%post_id%.html
云虚拟主机—站点—伪静态设置—WordPress
如果您不是在融亿云购买的虚拟主机,请将以下代码上传至您的虚拟主机根目录
<?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>