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 7中的ASLR
  2. C#清除WebBrowser的Cookie缓存
  3. 用VBS实现PHP的SHA1函数
  4. VBS获取硬件信息
  5. Microsoft Platform SDK Febrary 2003版下载

留下回复