1. # 只带月份的归档
  2. rewrite "^/date/([0-9]{6})/?([0-9]+)?/?$" /index.php?action=article&setdate=$1&page=$2 last;
  3. # 无分类翻页
  4. rewrite ^/page/([0-9]+)?/?$ /index.php?action=article&page=$1 last;
  5. # 分类
  6. rewrite ^/category/([0-9]+)/?([0-9]+)?/?$ /index.php?action=article&cid=$1&page=$2 last;
  7. rewrite ^/category/([^/]+)/?([0-9]+)?/?$ /index.php?action=article&curl=$1&page=$2 last;
  8. # 归档、高级搜索
  9. rewrite ^/(archives|search|article|links)/?$ /index.php?action=$1 last;
  10. # 全部评论、标签列表、引用列表 带分页
  11. rewrite ^/(comments|tagslist|trackbacks|article)/?([0-9]+)?/?$ /index.php?action=$1&page=$2 last;
  12. # tags
  13. rewrite ^/tag/([^/]+)/?([0-9]+)?/?$ /index.php?action=article&item=$1&page=$2 last;
  14. # 文章
  15. rewrite ^/archives/([0-9]+)/?([0-9]+)?/?$ /index.php?action=show&id=$1&page=$2 last;
  16. # RSS rewrite ^/rss/([0-9]+)?/?$ /rss.php?cid=$1 last;
  17. rewrite ^/rss/([^/]+)/?$ /rss.php?url=$1 last;
  18. # 用户 rewrite ^/uid/([0-9]+)/?([0-9]+)?/?$ /index.php?action=article&uid=$1&page=$2 last;
  19. rewrite ^/user/([^/]+)/?([0-9]+)?/?$ /index.php?action=article&user=$1&page=$2 last;
  20. # 地图文件
  21. rewrite sitemap.xml sitemap.php last;
  22. # 自定义链接
  23. rewrite ^(.*)/([0-9a-zA-Z\-\_]+)/?([0-9]+)?/?$ $1/index.php?action=show&alias=$2&page=$3 last;