Forum Replies Created
-
However, I can skip using wordpress registration page to solve this..
In reply to: Rewrite rules under lighttpd?I tried greenhome’s solution and it almost worked. Thanks!
However I got some minor errors, especially with links like http://domain.tld/forums/topic/test?replies=3#post-17 or http://domain.tld/forums/profile/username/favorites?fav=0&topic_id=1&_wpnonce=10a4ad44b8
Here is a workaround :
In /etc/lighttpd/bbpress-rewrite.conf, I have :
url.rewrite-once += (
# /forum/FORUM-NAME
"^" + bbpressdir + "forum/([^/]+)/page/([0-9]+)/?$" => bbpressdir + "forum.php?id=$1&page=$2",
"^" + bbpressdir + "forum/([^/]+)/?$" => bbpressdir + "forum.php?id=$1",
# /topic/TOPIC-NAME
"^" + bbpressdir + "topic/([^/?]+)(?(.*))?$" => bbpressdir + "topic.php?id=$1&$3",
"^" + bbpressdir + "topic/([^/]+)/page/([0-9]+)(?(.*))?/?$" => bbpressdir + "topic.php?id=$1&page=$2&$4",
# /tags/TAG-NAME
"^" + bbpressdir + "tags/([^/]+)/page/([0-9]+)/?$" => bbpressdir + "tags.php?tag=$1&page=$2",
"^" + bbpressdir + "tags/([^/]+)/?$" => bbpressdir + "tags.php?tag=$1",
"^" + bbpressdir + "tags/?$" => bbpressdir + "tags.php",
# /profile/PROFILE-NAME
"^" + bbpressdir + "profile/([^/]+)/([^/]+)/page/([0-9]+)/?$" => bbpressdir + "profile.php?id=$1&tab=$2&page=$3",
"^" + bbpressdir + "profile/([^/]+)/page/([0-9]+)/?$" => bbpressdir + "profile.php?id=$1&page=$2",
"^" + bbpressdir + "profile/([^/]+)/([^/?]+)(?(.*))?/?$" => bbpressdir + "profile.php?id=$1&tab=$2&$4",
#"^" + bbpressdir + "profile/([^/]+)/([^/]+)/?$" => bbpressdir + "profile.php?id=$1&tab=$2",
"^" + bbpressdir + "profile/([^/?]+)(?(.*))?$" => bbpressdir + "profile.php?id=$1&$3",
# /view/VIEW-NAME
"^" + bbpressdir + "view/([^/]+)/page/([0-9]+)/?$" => bbpressdir + "view.php?view=$1&page=$2",
"^" + bbpressdir + "view/([^/]+)/?$" => bbpressdir + "view.php?view=$1",
"^" + bbpressdir + "rss/?$" => bbpressdir + "rss.php",
# /rss/FEED-NAME
"^" + bbpressdir + "rss/forum/([^/]+)/?$" => bbpressdir + "rss.php?forum=$1",
"^" + bbpressdir + "rss/topic/([^/]+)/?$" => bbpressdir + "rss.php?topic=$1",
"^" + bbpressdir + "rss/tags/([^/]+)/?$" => bbpressdir + "rss.php?tag=$1",
"^" + bbpressdir + "rss/profile/([^/]+)/?$" => bbpressdir + "rss.php?profile=$1"
)
Finally, I just add this configuration for each vhost using bbpress :
$HTTP["host"] =~ "domain.tld" {
var.bbpressdir = "/forums/"
include "bbpress-rewrite.conf"
}
Hope this helps!
In reply to: Rewrite rules under lighttpd?