lighttpd rewrite rules

I have seen requests for this before and it blows me away that nobody has ever spent the time to do it. It took me about 30 minutes. On this test install the document root is /var/www and Boonex is installed at /var/www/boonex. If you installed Boonex to the root of your webserver then simply remove the /boonex folder from BOTH the left and right side of the rule.

 

url.rewrite-once = (
#boonex rewrite rules for lighttpd
     "^/boonex/blogs/{0,1}$" =>  "/boonex/modules/boonex/blogs/blogs.php",
     "^/boonex/blogs/all/{0,1}$" =>  "/boonex/modules/boonex/blogs/blogs.php?action=all",
     "^/boonex/blogs/all/([0-9]+)/([0-9]+)/{0,1}$" => "/boonex/modules/boonex/blogs/blogs.php?page=$2&per_page=$1",
     "^/boonex/blogs/top/{0,1}$" =>   "/boonex/modules/boonex/blogs/blogs.php?action=top_blogs",
     "^/boonex/blogs/top/([0-9]+)/([0-9]+)/{0,1}$" =>   "/boonex/modules/boonex/blogs/blogs.php?action=top_blogs&page=$2&per_page=$1",
     "^/boonex/blogs/top_posts/{0,1}$" =>   "/boonex/modules/boonex/blogs/blogs.php?action=top_posts",
     "^/boonex/blogs/top_posts/([0-9]+)/([0-9]+)/{0,1}$" =>   "/boonex/modules/boonex/blogs/blogs.php?action=top_posts&page=$2&per_page=$1",
     "^/boonex/blogs/tag/([^/boonex//.]+)/{0,1}$" =>   "/boonex/modules/boonex/blogs/blogs.php?action=search_by_tag&tagKey=$1",
     "^/boonex/blogs/tag/{0,1}$" =>   "/boonex/modules/boonex/blogs/blogs.php?action=search_by_tag&tagKey=",
     "^/boonex/blogs/posts/([^/boonex//.]+)/tag/([^/boonex//.]+)/{0,1}$" =>   "/boonex/modules/boonex/blogs/blogs.php?action=search_by_tag&tagKey=$2&ownerName=$1",
     "^/boonex/blogs/posts/([^/boonex//.]+)/category/([^/boonex//.]+)/{0,1}$" =>   "/boonex/modules/boonex/blogs/blogs.php?action=show_member_blog&ownerName=$1&categoryUri=$2",
     "^/boonex/blogs/entry/([^/boonex//.]+)/{0,1}$" =>   "/boonex/modules/boonex/blogs/blogs.php?action=show_member_post&postUri=$1",
     "^/boonex/blogs/entry/{0,1}$" =>    "/boonex/modules/boonex/blogs/blogs.php?action=show_member_post&postUri=",
     "^/boonex/blogs/posts/([^/boonex//.]+)/{0,1}$" =>   "/boonex/modules/boonex/blogs/blogs.php?action=show_member_blog&ownerName=$1",
     "^/boonex/blogs/posts/{0,1}$" =>   "/boonex/modules/boonex/blogs/blogs.php?action=show_member_blog&ownerName=",
     "^/boonex/blogs/posts/([^/boonex//.]+)/([0-9]+)/([0-9]+)/{0,1}$" =>   "/boonex/modules/boonex/blogs/blogs.php?action=show_member_blog&ownerName=$1&page=$3&per_page=$2",
     "^/boonex/blogs/posts/([^/boonex//.]+)/category/([^/boonex//.]+)/([0-9]+)/([0-9]+)/{0,1}$" =>   "/boonex/modules/boonex/blogs/blogs.php?action=show_member_blog&ownerName=$1&categoryUri=$2&page=$4&per_page=$3",
     "^/boonex/blogs/home/{0,1}$" =>   "/boonex/modules/boonex/blogs/blogs.php?action=home",
     "^/boonex/blogs/all_posts/{0,1}$" =>   "/boonex/modules/boonex/blogs/blogs.php?action=all_posts",
     "^/boonex/blogs/all_posts/([0-9]+)/([0-9]+)/{0,1}$" =>   "/boonex/modules/boonex/blogs/blogs.php?action=all_posts&page=$2&per_page=$1",
     "^/boonex/blogs/popular_posts/{0,1}$" =>   "/boonex/modules/boonex/blogs/blogs.php?action=popular_posts",
     "^/boonex/blogs/popular_posts/([0-9]+)/([0-9]+)/{0,1}$" =>   "/boonex/modules/boonex/blogs/blogs.php?action=popular_posts&page=$2&per_page=$1",
     "^/boonex/blogs/featured_posts/{0,1}$" =>   "/boonex/modules/boonex/blogs/blogs.php?action=featured_posts",
     "^/boonex/blogs/tags/{0,1}$" =>   "/boonex/modules/boonex/blogs/blogs.php?action=tags",
     "^/boonex/blogs/show_calendar/{0,1}$" =>   "/boonex/modules/boonex/blogs/blogs.php?action=show_calendar",
     "^/boonex/blogs/my_page/{0,1}$" =>   "/boonex/modules/boonex/blogs/blogs.php?action=my_page&mode=main",
     "^/boonex/blogs/my_page/add/{0,1}$" =>   "/boonex/modules/boonex/blogs/blogs.php?action=my_page&mode=add",
     "^/boonex/blogs/my_page/manage/{0,1}$" =>   "/boonex/modules/boonex/blogs/blogs.php?action=my_page&mode=manage",
     "^/boonex/blogs/my_page/pending/{0,1}$" =>   "/boonex/modules/boonex/blogs/blogs.php?action=my_page&mode=pending",
     "^/boonex/blogs/my_page/edit/([0-9]+)/{0,1}$" =>  "/boonex/modules/boonex/blogs/blogs.php?action=edit_post&EditPostID=$1",
     "^/boonex/blogs/member_posts/([0-9]+)/{0,1}$" =>   "/boonex/modules/boonex/blogs/blogs.php?action=show_member_blog&ownerID=$1",
     "^/boonex/blogs/category/([^/boonex//.]+)/{0,1}$" =>   "/boonex/modules/boonex/blogs/blogs.php?action=category&uri=$1",

     "^/boonex/ads/{0,1}$" =>  "/boonex/modules/boonex/ads/classifieds.php?Browse=1",
     "^/boonex/ads/my_page/{0,1}$" =>  "/boonex/modules/boonex/ads/classifieds.php?action=my_page",
     "^/boonex/ads/my_page/add/{0,1}$" =>  "/boonex/modules/boonex/ads/classifieds.php?action=my_page&mode=add",
     "^/boonex/ads/my_page/edit/([0-9]+)/{0,1}$" =>  "/boonex/modules/boonex/ads/classifieds.php?action=my_page&mode=add&EditPostID=$1",
     "^/boonex/ads/my_page/edit/([0-9]+)/dimg/([0-9]+)/{0,1}$" =>  "/boonex/modules/boonex/ads/classifieds.php?action=my_page&mode=add&EditPostID=$1&dimg=$2",
     "^/boonex/ads/my_page/manage/{0,1}$" =>  "/boonex/modules/boonex/ads/classifieds.php?action=my_page&mode=manage",
     "^/boonex/ads/my_page/pending/{0,1}$" =>  "/boonex/modules/boonex/ads/classifieds.php?action=my_page&mode=pending",
     "^/boonex/ads/my_page/expired/{0,1}$" =>  "/boonex/modules/boonex/ads/classifieds.php?action=my_page&mode=expired",
     "^/boonex/ads/my_page/disapproved/{0,1}$" =>  "/boonex/modules/boonex/ads/classifieds.php?action=my_page&mode=disapproved",
     "^/boonex/ads/cat/([^/boonex//.]+)/{0,1}$" =>  "/boonex/modules/boonex/ads/classifieds.php?catUri=$1",
     "^/boonex/ads/all/cat/([0-9]+)/([0-9]+)/([^/boonex//.]+)/{0,1}$" =>  "/boonex/modules/boonex/ads/classifieds.php?catUri=$3&page=$2&per_page=$1",
     "^/boonex/ads/subcat/([^/boonex//.]+)/{0,1}$" =>  "/boonex/modules/boonex/ads/classifieds.php?scatUri=$1",
     "^/boonex/ads/all/subcat/([0-9]+)/([0-9]+)/([^/boonex//.]+)/{0,1}$" =>  "/boonex/modules/boonex/ads/classifieds.php?scatUri=$3&page=$2&per_page=$1",
     "^/boonex/ads/entry/([^/boonex//.]+)/{0,1}$" =>  "/boonex/modules/boonex/ads/classifieds.php?entryUri=$1",
     "^/boonex/ads/tag/([^/boonex//.]+)/{0,1}$" =>  "/boonex/modules/boonex/ads/classifieds_tags.php?tag=$1",
     "^/boonex/ads/calendar/{0,1}$" =>  "/boonex/modules/boonex/ads/classifieds.php?action=show_calendar",
     "^/boonex/ads/categories/{0,1}$" =>  "/boonex/modules/boonex/ads/classifieds.php?action=show_categories",
     "^/boonex/ads/tags/{0,1}$" =>  "/boonex/modules/boonex/ads/classifieds.php?action=tags",
     "^/boonex/ads/all_ads/{0,1}$" =>  "/boonex/modules/boonex/ads/classifieds.php?action=show_all_ads",
     "^/boonex/ads/top_ads/{0,1}$" =>  "/boonex/modules/boonex/ads/classifieds.php?action=show_top_rated",
     "^/boonex/ads/popular_ads/{0,1}$" =>  "/boonex/modules/boonex/ads/classifieds.php?action=show_popular",
     "^/boonex/ads/featured_ads/{0,1}$" =>  "/boonex/modules/boonex/ads/classifieds.php?action=show_featured",
     "^/boonex/ads/member_ads/([0-9]+)/{0,1}$" =>  "/boonex/modules/boonex/ads/classifieds.php?UsersOtherListing=1&IDProfile=$1",

     "^/boonex/search/tag/([^/boonex//.]+)/{0,1}$" =>  "search.php?Tags=$1",

     "^/boonex/browse/([^/boonex//.]+)/([^/boonex//.]+)/([^/boonex//.]+)$" => " browse.php?sex=$1&age=$2&country=$3",

     "^/boonex/m/(.*)$" => "/boonex/modules/index.php?r=$1",

     "^/boonex/forum/groups/(.*)$" => "/boonex/modules/boonex/forum/$1?orca_integration=groups",
     "^/boonex/forum/events/(.*)$" => "/boonex/modules/boonex/forum/$1?orca_integration=events",
     "^/boonex/forum/store/(.*)$" => "/boonex/modules/boonex/forum/$1?orca_integration=store",
     "^/boonex/forum/$" => "/boonex/modules/boonex/forum/index.php",
     "^/boonex/forum/(.*)$" => "/boonex/modules/boonex/forum/$1",
     "^/boonex/page/(.*)$" => "/boonex/viewPage.php?ID=$1"
)

Quote · 19 Dec 2013

I decided to go ahead and post a standard version since mine is a bit custom with regards to location. If your Boonex is installed to the root of your webserver then just copy and paste this to your lighttpd.conf file.

 

 

url.rewrite-once = (
#boonex rewrite rules for lighttpd
     "^/blogs/{0,1}$" =>  "/modules/boonex/blogs/blogs.php",
     "^/blogs/all/{0,1}$" =>  "/modules/boonex/blogs/blogs.php?action=all",
     "^/blogs/all/([0-9]+)/([0-9]+)/{0,1}$" => "/modules/boonex/blogs/blogs.php?page=$2&per_page=$1",
     "^/blogs/top/{0,1}$" =>   "/modules/boonex/blogs/blogs.php?action=top_blogs",
     "^/blogs/top/([0-9]+)/([0-9]+)/{0,1}$" =>   "/modules/boonex/blogs/blogs.php?action=top_blogs&page=$2&per_page=$1",
     "^/blogs/top_posts/{0,1}$" =>   "/modules/boonex/blogs/blogs.php?action=top_posts",
     "^/blogs/top_posts/([0-9]+)/([0-9]+)/{0,1}$" =>   "/modules/boonex/blogs/blogs.php?action=top_posts&page=$2&per_page=$1",
     "^/blogs/tag/([^/boonex//.]+)/{0,1}$" =>   "/modules/boonex/blogs/blogs.php?action=search_by_tag&tagKey=$1",
     "^/blogs/tag/{0,1}$" =>   "/modules/boonex/blogs/blogs.php?action=search_by_tag&tagKey=",
     "^/blogs/posts/([^/boonex//.]+)/tag/([^/boonex//.]+)/{0,1}$" =>   "/modules/boonex/blogs/blogs.php?action=search_by_tag&tagKey=$2&ownerName=$1",
     "^/blogs/posts/([^/boonex//.]+)/category/([^/boonex//.]+)/{0,1}$" =>   "/modules/boonex/blogs/blogs.php?action=show_member_blog&ownerName=$1&categoryUri=$2",
     "^/blogs/entry/([^/boonex//.]+)/{0,1}$" =>   "/modules/boonex/blogs/blogs.php?action=show_member_post&postUri=$1",
     "^/blogs/entry/{0,1}$" =>    "/modules/boonex/blogs/blogs.php?action=show_member_post&postUri=",
     "^/blogs/posts/([^/boonex//.]+)/{0,1}$" =>   "/modules/boonex/blogs/blogs.php?action=show_member_blog&ownerName=$1",
     "^/blogs/posts/{0,1}$" =>   "/modules/boonex/blogs/blogs.php?action=show_member_blog&ownerName=",
     "^/blogs/posts/([^/boonex//.]+)/([0-9]+)/([0-9]+)/{0,1}$" =>   "/modules/boonex/blogs/blogs.php?action=show_member_blog&ownerName=$1&page=$3&per_page=$2",
     "^/blogs/posts/([^/boonex//.]+)/category/([^/boonex//.]+)/([0-9]+)/([0-9]+)/{0,1}$" =>   "/modules/boonex/blogs/blogs.php?action=show_member_blog&ownerName=$1&categoryUri=$2&page=$4&per_page=$3",
     "^/blogs/home/{0,1}$" =>   "/modules/boonex/blogs/blogs.php?action=home",
     "^/blogs/all_posts/{0,1}$" =>   "/modules/boonex/blogs/blogs.php?action=all_posts",
     "^/blogs/all_posts/([0-9]+)/([0-9]+)/{0,1}$" =>   "/modules/boonex/blogs/blogs.php?action=all_posts&page=$2&per_page=$1",
     "^/blogs/popular_posts/{0,1}$" =>   "/modules/boonex/blogs/blogs.php?action=popular_posts",
     "^/blogs/popular_posts/([0-9]+)/([0-9]+)/{0,1}$" =>   "/modules/boonex/blogs/blogs.php?action=popular_posts&page=$2&per_page=$1",
     "^/blogs/featured_posts/{0,1}$" =>   "/modules/boonex/blogs/blogs.php?action=featured_posts",
     "^/blogs/tags/{0,1}$" =>   "/modules/boonex/blogs/blogs.php?action=tags",
     "^/blogs/show_calendar/{0,1}$" =>   "/modules/boonex/blogs/blogs.php?action=show_calendar",
     "^/blogs/my_page/{0,1}$" =>   "/modules/boonex/blogs/blogs.php?action=my_page&mode=main",
     "^/blogs/my_page/add/{0,1}$" =>   "/modules/boonex/blogs/blogs.php?action=my_page&mode=add",
     "^/blogs/my_page/manage/{0,1}$" =>   "/modules/boonex/blogs/blogs.php?action=my_page&mode=manage",
     "^/blogs/my_page/pending/{0,1}$" =>   "/modules/boonex/blogs/blogs.php?action=my_page&mode=pending",
     "^/blogs/my_page/edit/([0-9]+)/{0,1}$" =>  "/modules/boonex/blogs/blogs.php?action=edit_post&EditPostID=$1",
     "^/blogs/member_posts/([0-9]+)/{0,1}$" =>   "/modules/boonex/blogs/blogs.php?action=show_member_blog&ownerID=$1",
     "^/blogs/category/([^/boonex//.]+)/{0,1}$" =>   "/modules/boonex/blogs/blogs.php?action=category&uri=$1",

     "^/ads/{0,1}$" =>  "/modules/boonex/ads/classifieds.php?Browse=1",
     "^/ads/my_page/{0,1}$" =>  "/modules/boonex/ads/classifieds.php?action=my_page",
     "^/ads/my_page/add/{0,1}$" =>  "/modules/boonex/ads/classifieds.php?action=my_page&mode=add",
     "^/ads/my_page/edit/([0-9]+)/{0,1}$" =>  "/modules/boonex/ads/classifieds.php?action=my_page&mode=add&EditPostID=$1",
     "^/ads/my_page/edit/([0-9]+)/dimg/([0-9]+)/{0,1}$" =>  "/modules/boonex/ads/classifieds.php?action=my_page&mode=add&EditPostID=$1&dimg=$2",
     "^/ads/my_page/manage/{0,1}$" =>  "/modules/boonex/ads/classifieds.php?action=my_page&mode=manage",
     "^/ads/my_page/pending/{0,1}$" =>  "/modules/boonex/ads/classifieds.php?action=my_page&mode=pending",
     "^/ads/my_page/expired/{0,1}$" =>  "/modules/boonex/ads/classifieds.php?action=my_page&mode=expired",
     "^/ads/my_page/disapproved/{0,1}$" =>  "/modules/boonex/ads/classifieds.php?action=my_page&mode=disapproved",
     "^/ads/cat/([^/boonex//.]+)/{0,1}$" =>  "/modules/boonex/ads/classifieds.php?catUri=$1",
     "^/ads/all/cat/([0-9]+)/([0-9]+)/([^/boonex//.]+)/{0,1}$" =>  "/modules/boonex/ads/classifieds.php?catUri=$3&page=$2&per_page=$1",
     "^/ads/subcat/([^/boonex//.]+)/{0,1}$" =>  "/modules/boonex/ads/classifieds.php?scatUri=$1",
     "^/ads/all/subcat/([0-9]+)/([0-9]+)/([^/boonex//.]+)/{0,1}$" =>  "/modules/boonex/ads/classifieds.php?scatUri=$3&page=$2&per_page=$1",
     "^/ads/entry/([^/boonex//.]+)/{0,1}$" =>  "/modules/boonex/ads/classifieds.php?entryUri=$1",
     "^/ads/tag/([^/boonex//.]+)/{0,1}$" =>  "/modules/boonex/ads/classifieds_tags.php?tag=$1",
     "^/ads/calendar/{0,1}$" =>  "/modules/boonex/ads/classifieds.php?action=show_calendar",
     "^/ads/categories/{0,1}$" =>  "/modules/boonex/ads/classifieds.php?action=show_categories",
     "^/ads/tags/{0,1}$" =>  "/modules/boonex/ads/classifieds.php?action=tags",
     "^/ads/all_ads/{0,1}$" =>  "/modules/boonex/ads/classifieds.php?action=show_all_ads",
     "^/ads/top_ads/{0,1}$" =>  "/modules/boonex/ads/classifieds.php?action=show_top_rated",
     "^/ads/popular_ads/{0,1}$" =>  "/modules/boonex/ads/classifieds.php?action=show_popular",
     "^/ads/featured_ads/{0,1}$" =>  "/modules/boonex/ads/classifieds.php?action=show_featured",
     "^/ads/member_ads/([0-9]+)/{0,1}$" =>  "/modules/boonex/ads/classifieds.php?UsersOtherListing=1&IDProfile=$1",

     "^/search/tag/([^/boonex//.]+)/{0,1}$" =>  "search.php?Tags=$1",

     "^/browse/([^/boonex//.]+)/([^/boonex//.]+)/([^/boonex//.]+)$" => " browse.php?sex=$1&age=$2&country=$3",

     "^/m/(.*)$" => "/modules/index.php?r=$1",

     "^/forum/groups/(.*)$" => "/modules/boonex/forum/$1?orca_integration=groups",
     "^/forum/events/(.*)$" => "/modules/boonex/forum/$1?orca_integration=events",
     "^/forum/store/(.*)$" => "/modules/boonex/forum/$1?orca_integration=store",
     "^/forum/$" => "/modules/boonex/forum/index.php",
     "^/forum/(.*)$" => "/modules/boonex/forum/$1",
     "^/page/(.*)$" => "/boonex/viewPage.php?ID=$1"
)

Quote · 19 Dec 2013

Does this also work for Linux ngin-x?

Quote · 19 Dec 2013

I doubt it, nginx has its own format. I did see some for nginx someplace though.

Quote · 19 Dec 2013
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.