wordpress未分类

wordpress nginx.conf 文件

新建 nginx.config

location / {
    try_files $uri $uri/ /index.php?$args;
}

# Add trailing slash to */wp-admin requests.
rewrite /wp-admin$ $scheme://$host$uri/ permanent;

说明

wordpress url 重写

location / {
    try_files $uri $uri/ /index.php?$args;
}

# Add trailing slash to */wp-admin requests.
rewrite /wp-admin$ $scheme://$host$uri/ permanent;

nginx.conf安全配置 禁用一些目录打开php后缀文件

location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }