Go Back   Pligg CMS Forum > Pligg Development > Modification Tutorials

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
Thanks: 0
Thanked 3 Times in 1 Post
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
The Following 3 Users Say Thank You to pablasso For This Useful Post:
  #2 (permalink)  
Old 09-05-2006, 12:48 PM
New Pligger
 
Join Date: Sep 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
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 7 05-30-2007 12:13 AM
it is acturely that Pligg 9.1beta is not support chinese cute2008 Bug Report 5 03-13-2007 09:56 AM
what collation should be used when creating database to support chinese? wanderingcat Installation and Upgrade Help 2 12-29-2006 01:58 PM


Search Engine Friendly URLs by vBSEO 3.2.0