以前有篇文章是介紹在Apache、Lighttpd及IIS網站服務器平臺上設置wordpress永久固定鏈接方法的文章,好像就漏掉了nginx平臺下的,今天百度Google淘了篇nginx平臺下設置wordpress永久固定鏈接偽靜態方法,具體需要做:
打開nginx配置文件nginx.conf,在location段添加下面這一行代碼:
vim /usr/local/nginx/conf/nginx.conf
在server容器中添加下面這幾行
location /
{
try_files $uri $uri/ /index.php?q=$uri&$args;
}
最后重啟nginx
#/usr/local/nginx/sbin/nginx -s reload