Pligg CMS Forums


Go Back   Pligg CMS Forum > Pligg Development > Modification Tutorials



support for lighttpd

Advanced Tutorials for Modifying your Pligg site


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-25-2006, 04:24 AM
New Pligger
 
Join Date: Aug 2006
Location: Guadalajara, Mexico
Posts: 2
support for lighttpd

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
Sponsor
  #2 (permalink)  
Old 09-05-2006, 12: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, 12: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, 02: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
Unicode / Complex Language Support visu Modification Tutorials 3 07-07-2007 01:02 AM
Non-javascript support Simon General Help 6 05-29-2007 11:23 PM
what collation should be used when creating database to support chinese? wanderingcat Installation and Upgrade Help 2 12-29-2006 01:58 PM

Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Use the coupon code PLIGG at Dreamhost.com to receive a discount of up to $84.00 Make a donation to support Pligg CMS development