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. 再谈CreateObject函数,VBS到底能调用哪些对象?
  2. WMI入门教程:第三部分
  3. 使用Scripting.Encoder加密VBS脚本
  4. 用VBS实现繁体中文和简体中文转换
  5. OpenWrt配置HTTPS访问LuCI

留下回复