修改/etc/nginx/nginx.conf,tae的话可能在conf.d里边的virtual.conf,在server里边添加伪静态规则
location / {
index index.php index.html index.htm;
rewrite ^(.*)/item/([0-9]+)\.html $1/item.php?id=$2 last;
}
大概是这样,规则要自己测试
wordpress网站设定伪静态有益于seo优化,而且有益于百度搜索引擎网络爬虫浏览,提升网址文章内容百度收录的速率。下边我共享一下wordpress网站伪静态设定的方式。