默认的网址像 http://example.com/?p=123
不易阅读和记忆,设置伪静态后可变成 http://example.com/hello-world/
,更友好。
有利于 SEO: 搜索引擎更喜欢简洁、包含关键词的网址结构,有助于提高页面排名。
提升用户体验: 读者更容易理解页面内容和结构,如 /category/tech/
比 ?cat=3
更清晰。
兼容性强:
location / {
try_files $uri $uri/ /index.php?$args;
}
systemctl reload nginx
-
-
填写
/%post_id%.html
或/%postname%.html
声明:本文为原创文章,版权归深谋之道所有,欢迎分享本文,转载请保留出处!