安装PHP以及搭建博客(四)伪静态

访问网站?p=4  动态链接,更改为 伪静态

http://blog.daxian.com/?p=4

实现wordpress的URL伪静态

设置 -----固定连接-------自定义结构-----输入代码

/archives/%post_id%.html

保存

修改nginx

cd /application/nginx/conf/extra/

vim blog.conf

location / {
root html/blog;
index index.php index.html index.htm;
try_files $uri $uri/ /index.php?q=$uri&args;
}

/application/nginx/sbin/nginx -t

/application/nginx/sbin/nginx -s reload

访问网站文章

原文地址:https://www.cnblogs.com/sky00747/p/8442423.html