2024 向好而生

💻

wordpress nginx 伪静态配置

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

rewrite /wp-admin$ $scheme://$host$uri/ permanent;

location = /favicon.ico {
        log_not_found off;
        access_log off;
}

location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;
}

location ~ /\. {
        deny all;
}

location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
       access_log off; log_not_found off; expires max;
}

1 条评论

  1. baidu

    难道这个防垃圾很管用?

留下回复给 取消回复

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据