Info
- 9 posts
- 6 voices
- Started 3 years ago by risoknop
- Latest reply from webmacho
- This topic is not resolved
bbPress AND Lighttpd URL rewrite rules
-
- Posted 3 years ago #
Hello, I have installed bbPress at one of my websites (in a subdirectory called "forums" - i.e. bbPress is installed at mydomain.com/forums/).
I'm trying to set up Lighttpd URL rewrite rules now in order to achieve SEO friendly permalinks.
I have tried to google a little bit but the only thing I have found is this:
"^/forum/([^/]+)/page/([0-9]+)/?$" => "/forum.php?id=&page=", "^/forum/([^/]+)/?$" => "/forum.php?id=", "^/topic/([^/]+)/page/([0-9]+)/?$" => "/topic.php?id=&page=", "^/topic/([^/]+)/?$" => "/topic.php?id=", "^/tags/([^/]+)/page/([0-9]+)/?$" => "/tags.php?tag=&page=", "^/tags/([^/]+)/?$" => "/tags.php?tag=", "^/tags/?$" => "/tags.php", "^/profile/([^/]+)/page/([0-9]+)/?$" => "/profile.php?id=&page=", "^/profile/([^/]+)/([^/]+)/?$" => "/profile.php?id=&tab=", "^/profile/([^/]+)/([^/]+)/page/([0-9]+)/?$" => "/profile.php?id=&tab=&page=", "^/profile/([^/]+)/([^/]+)/favorites/?$" => "/profile.php?id=&tab=favorites", "^/profile/([^/]+)/?$" => "/profile.php?id=", "^/view/([^/]+)/page/([0-9]+)/?$" => "/view.php?view=&page=", "^/view/([^/]+)/?$" => "/view.php?view=", "^/rss/?$" => "/rss.php", "^/rss/forum/([^/]+)/?$" => "/rss.php?forum=", "^/rss/topic/([^/]+)/?$" => "/rss.php?topic=", "^/rss/tags/([^/]+)/?$" => "/rss.php?tag=", "^/rss/profile/([^/]+)/?$" => "/rss.php?profile="Could anybody tell me how to edit it taking into consideration the subfolder where the bbPress is installed?
My current Lighttpd rewrite rules in config file are bellow:
url.rewrite-once = ( "^/(wp-.+).*/?" => "%%tl_code_block%%", "^/images/.*/?" => "%%tl_code_block%%", "^/forums/.*/?" => "%%tl_code_block%%", "^/temp/.*/?" => "%%tl_code_block%%", "^/(sitemap.xml)" => "%%tl_code_block%%", "^/(xmlrpc.php)" => "%%tl_code_block%%", "^/keyword/([A-Za-z_0-9\-]+)/?$" => "/index.php?keyword=", "^/.*?(\?.*)?$" => "/index.php" ) -
- Posted 3 years ago #
This one actually works. bbpress in /forums/
"^/forums/forum/([^/]+)/page/([0-9]+)/?$" => "/forums/forum.php?id=$1&page=$2",
"^/forums/forum/([^/]+)/?$" => "/forums/forum.php?id=$1",
"^/forums/topic/([^/]+)/page/([0-9]+)/?$" => "/forums/topic.php?id=$1&page=$2",
"^/forums/topic/([^/]+)/?$" => "/forums/topic.php?id=$1",
"^/forums/tags/([^/]+)/page/([0-9]+)/?$" => "/forums/tags.php?tag=$1&page=$2",
"^/forums/tags/([^/]+)/?$" => "/forums/tags.php?tag=$1",
"^/forums/tags/?$" => "/forums/tags.php",
"^/forums/profile/([^/]+)/page/([0-9]+)/?$" => "/forums/profile.php?id=$1&page=$2",
"^/forums/profile/([^/]+)/([^/]+)/?$" => "/forums/profile.php?id=$1&tab=$2",
"^/forums/profile/([^/]+)/([^/]+)/page/([0-9]+)/?$" => "/forums/profile.php?id=$1&tab=$2&page=$3",
"^/forums/profile/([^/]+)/([^/]+)/favorites/?$" => "/forums/profile.php?id=$1&tab=favorites",
"^/forums/profile/([^/]+)/?$" => "/forums/profile.php?id=$1",
"^/forums/view/([^/]+)/page/([0-9]+)/?$" => "/forums/view.php?view=$1&page=$2",
"^/forums/view/([^/]+)/?$" => "/forums/view.php?view=$1",
"^/forums/rss/?$" => "/forums/rss.php",
"^/forums/rss/forums/forum/([^/]+)/?$" => "/forums/rss.php?forum=$1",
"^/forums/rss/forums/topic/([^/]+)/?$" => "/forums/rss.php?topic=$1",
"^/forums/rss/forums/tags/([^/]+)/?$" => "/forums/rss.php?tag=$1",
"^/forums/rss/forums/profile/([^/]+)/?$" => "/forums/rss.php?profile=$1" -
- Posted 3 years ago #
I found other issues with this setup, particularly in passing more than one parameter via get. I went back to ?forum_id=1 type urls.
-
- Posted 3 years ago #
There was a lighttpd "pro" on the irc channel last week named "rockerdan"
There are also several threads around here about it:
http://www.google.com/search?q=Lighttpd+site%3Abbpress.org&num=100 -
- Posted 3 years ago #
The problem with these solutions is that none of them work with more than one _GET parameter. Particularly with the QUOTE extension. Also, it wasn't over clear how a larger forum would handle duplicate subject topics.
-
- Posted 3 years ago #
Lighttpd "pro" - thanks but im not, hehe... Anyways it was me on irc the other day, I have bbPress running now, and have made a few changes to the the rewrite rules, I found exactly some errors regarding some urls needing more parameters...
This is how it looks now:
http://lab.anotherdan.com/conf/bbpress-rewrite.conf.txtI havent been through it all but at least some it works :) (Note this also contains some of the custom rewriting im doing for this install)
-
- Posted 3 years ago #
I am going to talk to the regex gurus at work tomorrow and see if some sushi is motivation enough for them. There needs to be a complete conversion from path to normal get parameters.
-
- Posted 2 years ago #
Had to add an extra rule to make this work for continuation pages of the front page:
"^/page/([0-9]+)/?$" => "/?page=$1",
There appears to be an issue still, within BBpress 1.02 this time: when on a continuation page, the link for "Page 1" does not include a "1" but the number of the current page - so the link does nothing and does not return to the home page.
-
- Posted 1 year ago #
None of this works for me
-
You must log in to post.