support for lighttpd

Register an Account
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 08-25-2006, 05:24 AM
New Pligger
 
Join Date: Aug 2006
Location: Guadalajara, Mexico
Posts: 1
i rewrote the rewriting rules so pligg works with lighttpd, just update the url.rewrite-once variable inside the lighttpd.conf with this:

Code:
        url.rewrite-once = ( 
                "^/story/([0-9]+)/?" => "/story.php?id=$1",
                "^/story/([a-zA-Z0-9-]+)/?" => "/story.php?title=$1",
                "^/recommend/([a-zA-Z0-9-]+)/?" => "/recommend.php?id=$1",
                "^/category/(.*)/?" => "/?category=$1",
                "^/queued/category/(.*)/?" => "shakeit.php?category=$1",
                "^/shakeit/category/(.*)/?" => "shakeit.php?category=$1",
                "^/story/([0-9]+)/editcomment/([0-9]+)?" => "/edit.php?id=$1&commentid=$2",
                "^/story/([0-9]+)/edit/?" => "/editlink.php?id=$1",
                "^/story/([0-9]+)/modify/([a-z]+)/?" => "/linkadmin.php?id=$1&action=$2",
                "^/user/([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)/?" => "/user.php?login=$1&view=$2",
                "^/user/([a-zA-Z0-9-]+)/?" => "/user.php?login=$1",
                "^/search/([a-zA-Z0-9-]+)/?" => "/index.php?search=$1",
                "^/login/?" => "/login.php",
                "^/login/([a-zA-Z0-9-]+)/?" => "/login.php?return=$1",
                "^/login/([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)/?" => "/login.php?return=$1/$2",
                "^/register/?" => "/register.php",
                "^/user/?" => "/user.php",
                "^/topusers/?" => "/topusers.php",
                "^/topstories/?" => "/topstories.php",
                "^/about/([a-zA-Z0-9-]+)/?" => "/faq-$1.php",
                "^/shakeit/?" => "/shakeit.php",
                "^/submit/?" => "/submit.php",
                "^/bugreport/?" => "/bugreport.php",
                "^/rss2/?" => "/rss2.php",
                "^/rss2/([a-zA-Z0-9-]+)/?" => "/rss2.php?status=$1",
                "^/trackback/([0-9]+)/?" => "/trackback.php?id=$1",
                "^/profile/?" => "/profile.php",
                "^/admin/?" => "/admin_index.php",
                "^/tagcloud/?" => "/cloud.php",
                "^/tag/(.+)/?" => "/index.php?search=$1&tag=true",
                "^/sneak/?" => "/sneak.php",
                "^/pliggadmin/?" => "/admin_index.php",
                "^/logout/([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)/?" => "/login.php?op=logout&return=$1/$2"
)
put it inside this, if you have more than 1 site

Quote:
$HTTP["host"] =~ "^www.(example|example2).com$" {
}
its not 100% tested, but seems to work fine for pligg b7, hope it helps someone
Reply With Quote
  #2 (permalink)  
Old 09-05-2006, 01:48 PM
New Pligger
 
Join Date: Sep 2006
Posts: 5
Hi,

the set of rewrite rules for lighty does not work 100% because of precedence.

I use the following one, that may not be perfect either, but everything i tested is functionnal:

"^/category/([0-9]+)/digg" => "shakeit.php?category=$2",
"^/category/([0-9]+)" => "?category=$1",
"^/story/([0-9]+)/editcomment/([0-9]+)?$" => "edit.php?id=$1&commentid=$2",
"^/story/([0-9]+)/edit" => "editlink.php?id=$1",
"^/story/([0-9]+)/modify/([a-z]+)" => "linkadmin.php?id=$1&action=$2",
"^/story/([0-9]+)" => "story.php?id=$1",
"^/user/([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)" => "user.php?login=$1&view=$2",
"^/user/([a-zA-Z0-9-]+)" => "user.php?login=$1",
"^/search/([a-zA-Z0-9-]+)" => "index.php?search=$1",
"^/login/([a-zA-Z0-9-]+)" => "login.php?return=$1",
"^/login/([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)" => "login.php?return=$1/$2",
"^/login" => "login.php",
"^/register" => "register.php",
"^/user" => "user.php",
"^/topusers" => "topusers.php",
"^/topstories" => "topstories.php",
"^/about/([a-zA-Z0-9-]+)" => "faq-$1.php",
"^/shakeit" => "shakeit.php",
"^/submit" => "submit.php",
"^/bugreport" => "http://www.pligg.com/forum/forumdisplay.php?f=13",
"^/rss2/([a-zA-Z0-9-]+)" => "rss2.php?status=$1",
"^/rss2" => "rss2.php",
"^/trackback/([0-9]+)" => "trackback.php?id=$1",
"^/profile" => "profile.php",
"^/admin/" => "admin_index.php"

Hope this helps!
Reply With Quote
  #3 (permalink)  
Old 02-04-2009, 01:27 PM
New Pligger
 
Join Date: Feb 2009
Posts: 2
Rewrites for lighttpd:

Lighttpd - Pligg - lighty labs

If you find any bug let me know, my e-mail is chris [at] cretaforce.gr
Reply With Quote
  #4 (permalink)  
Old 06-23-2009, 03:43 PM
New Pligger
Pligg Version: 9.8
Pligg Template: yget
 
Join Date: Nov 2007
Posts: 6
The above rewrite rule doesn't work. Please help. I get 404 error. Can I use lighthtpd for Pliff CMS 1.0 RC5? I found pligg depends on rewrite rule heavily. Does it work on apache without out .htaccess?
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
PliggMo by nadia - Fully support UTF8 language (Thai) ♥ไทยจ้า♥ Techkr Questions and Comments 6 06-20-2009 11:25 AM
Unicode / Complex Language Support visu Questions and Comments 3 07-07-2007 02:02 AM
what collation should be used when creating database to support chinese? wanderingcat Questions and Comments 2 12-29-2006 02:58 PM
coComment support gragland Questions and Comments 0 07-15-2006 12:06 AM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development