bbPress Nginx Rewrite

标签: , ,

bbPress在Nginx下的Rewrite规则。

rewrite ^/page/([0-9]+)/?$ /index.php?page=$1 last;
rewrite ^/forum/([^/]+)/page/([0-9]+)/?$ /forum.php?id=$1&page=$2 last;
rewrite ^/forum/([^/]+)/?$ /forum.php?id=$1 last;
rewrite ^/forum/?$ / permanent;
rewrite ^/topic/([^/]+)/page/([0-9]+)/?$ /topic.php?id=$1&page=$2 last;
rewrite ^/topic/([^/]+)/?$ /topic.php?id=$1 last;
rewrite ^/topic/?$ / permanent;
rewrite ^/tags/([^/]+)/page/([0-9]+)/?$ /tags.php?tag=$1&page=$2 last;
rewrite ^/tags/([^/]+)/?$ /tags.php?tag=$1 last;
rewrite ^/tags/?$ /tags.php last;
rewrite ^/profile/([^/]+)/page/([0-9]+)/?$ /profile.php?id=$1&page=$2 last;
rewrite ^/profile/([^/]+)/([^/]+)/?$ /profile.php?id=$1&tab=$2 last;
rewrite ^/profile/([^/]+)/([^/]+)/page/([0-9]+)/?$ /profile.php?id=$1&tab=$2&page=$3 last;
rewrite ^/profile/([^/]+)/?$ /profile.php?id=$1 last;
rewrite ^/profile/?$ /profile.php last;
rewrite ^/view/([^/]+)/page/([0-9]+)/?$ /view.php?view=$1&page=$2 last;
rewrite ^/view/([^/]+)/?$ /view.php?view=$1 last;
rewrite ^/rss/?$ /rss.php last;
rewrite ^/rss/topics/?$ /rss.php?topics=1 last;
rewrite ^/rss/forum/([^/]+)/?$ /rss.php?forum=$1 last;
rewrite ^/rss/forum/([^/]+)/topics/?$ /rss.php?forum=$1&topics=1 last;
rewrite ^/rss/topic/([^/]+)/?$ /rss.php?topic=$1 last;
rewrite ^/rss/tags/([^/]+)/?$ /rss.php?tag=$1 last;
rewrite ^/rss/tags/([^/]+)/topics/?$ /rss.php?tag=$1&topics=1 last;
rewrite ^/rss/profile/([^/]+)/?$ /rss.php?profile=$1 last;
rewrite ^/rss/view/([^/]+)/?$ /rss.php?view=$1 last;
if (!-e $request_filename) {
    rewrite ^/.*$ /index.php last;
}
赞赏

微信赞赏支付宝赞赏

随机文章:

  1. 确定Windows XP到底是UCS-2的还是UTF-16的
  2. VBS显示桌面
  3. 用C语言实现PHP的urlencode函数
  4. VBS 自动登录论坛
  5. VBS脚本设置虚拟内存大小和位置

留下回复