Skip to content
lotro@live.cn
  • 顺遂无虞 皆得所愿

wordpress nginx 伪静态配置

凡叔 2013-08-22 1 27
☖
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;
}
nginx

1 Comment

  1. baidu说道:
    2013-08-27 16:55

    难道这个防垃圾很管用?

    回复

发表回复 取消回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理。

© 2026 吉喜. Theme by Rabbit Lite.