Debian 10 / Windows 10 LTSC
Nginx / IIS 10
宝塔面板/OneinStack
WordPress
WordPress下载地址:https://wordpress.org/latest.zip
本站WordPress备份:wordpress-5.4.2.zip
设置固定链接
1>设置伪静态
可用宝塔面板设置,「网站-设置-伪静态」。
Linux Nginx
可直接选wordpress规则如下:
location /
{
try_files $uri $uri/ /index.php?$args;
}
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
Windows IIS
切勿直接选择wordpress规则模板。Windows宝塔默认的wordpress与IIS不兼容。需先在「网站-设置-配置文件」选择恢复默认配置如下:
<?xml version="1.0" ?>
<configuration>
<location allowOverride="false" inheritInChildApplications="false" path=".">
<system.webServer>
<rewrite>
<rules configSource="web_config\rewrite.config"></rules>
</rewrite>
<defaultDocument configSource="web_config\default.config"></defaultDocument>
<httpErrors configSource="web_config\httpErrors.config"></httpErrors>
<handlers configSource="web_config\php.config"></handlers>
</system.webServer>
</location>
</configuration>
再在「网站-设置-伪静态」,手动设置伪静态如下(注意将下文中www.uionm.com替换为自己实际的网址):
<rule name="WordPress: https://www.uionm.com" patternSyntax="Wildcard">
<match url="*"></match>
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"></add>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"></add>
</conditions>
<action type="Rewrite" url="index.php"></action>
</rule>
2>更改固定链接
WordPress面板中「设置-固定链接」去掉index.php即可。
WP插件
WP-UTF8-Excerpt
WordPress面板中「设置-摘要选项」即可设置文章显示长度。
Akismet Anti-Spam
Google XML Sitemaps
Comments | 1 条评论
Hello world!