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. 利用WMI打造完美“三无”后门-U盘侦测与Autorun
  2. 用VBS实现Shuffle洗牌算法
  3. VBS使用Scripting.Dictionary字典对象
  4. C语言调用API获取程序自身的路径
  5. VBS实现UTF-8转Unicode(UTF-16)

留下回复