Check today's New Posts or your PMs

Welcome Guest ( Log In | Register )

Tags
This content has not been tagged yet
 Digg this topic · Save to del.icio.us · Slashdot It · Post to Technorati · Post to Furl · Submit to Reddit · Share on Facebook · Fark It · Googlize This Post · Add to ma.gnolia · Tag to Wink · Add to MyWeb · Add to Netscape
Reply to this topicStart new topic
Using CommunitySEO with lighttpd (mod_rewrite rules)
admin
post Mar 9 2007, 06:25 AM
Post #1


Administrator
***

Group: Root Admin
Posts: 4,994
Joined: 25-January 07
Member No.: 1



lighttpd is a lightweight and fast webserver application that can be used instead of Apache - providing many of the same features, while using fewer resources.

lighttpd has a module similar to mod_rewrite, however the syntax for the rules is indeed different from the syntax used for Apache.

One of our users has generously converted the mod_rewrite rules for lighttpd, and has provided them to us for your benefit.

  1. Open /etc/lighttpd/lighttpd.conf
  2. Ensure mod_rewrite is uncommented in server.modules
    CODE
    server.modules                     =   (
                                                                      "mod_rewrite",
                                                                      "mod_redirect",
       ...
  3. Find
    CODE
    # Rewrite
  4. Add below
    CODE
    $HTTP["host"] == "yourdomain.com" {
    yourdomain.com is your domain name without any http:// or trailing slash. For example, we would use "communityseo.com".
  5. Add the contents of this attached file: Attached File  light.txt ( 5.53K ) Number of downloads: 347
  6. Close this host section with
    CODE
    }
  7. Restart Lighttpd server

A few important notes to keep in mind
  • The attached light.txt assumes your forums are located in a /forums folder. If they are not, open the file and remove all instances of "forums/" (just do a search/replace and replace it with nothing) before adding to your lighttpd.conf configuration file.
  • This file does not have the IPS Gallery, Blog, and Download manager rewrite rules included. If someone would like to convert those and provide it to me, I will be happy to update this FAQ article with those as well.
  • We designed the modification for Apache mod_rewrite, and thus can only really provide support for the mod_rewrite functionality on Apache. While the above should work fine, and cause no harm, you do use these steps at your own risk and we will not be held responsible for support of the lighttpd mod_rewrite rules themselves.
If there are any issues please let us know!
Go to the top of the page
 
+Quote Post
DDF
post Sep 23 2007, 01:25 PM
Post #2


Advanced Member
***

Group: Customers
Posts: 110
Joined: 23-June 07
Member No.: 270



could you update this with the latest rules.. i asume htaccess changed since march 9 when this article was posted..
Go to the top of the page
 
+Quote Post
admin
post Sep 24 2007, 04:38 AM
Post #3


Administrator
***

Group: Root Admin
Posts: 4,994
Joined: 25-January 07
Member No.: 1



Actually, no, the rules haven't changed as far as I can see. If you find a problem I'll be glad to update the file, but I don't see anything out of the ordinary.

Note that, as stated in the topic above, we don't support this - it was provided by a user as a courtesy (he did the conversion himself and supplied the rules to us).
Go to the top of the page
 
+Quote Post
modaco
post Oct 10 2007, 08:20 AM
Post #4


Advanced Member
***

Group: Customers
Posts: 91
Joined: 19-July 07
Member No.: 339



That's actually a bit out of date, it doesn't seem to support IDM etc.

Here's the latest rules converted as running on my site, obviously replace '^/' with '^/forum/' or whatever if you are running in a subdirectory. You need to add them to the appropriate host in your lighttpd config, and you need mod_rewrite enabled (ensure that in 'server.modules' you see 'mod_rewrite').

CODE
        url.rewrite-once = (
            ^/(.*)-t([0-9][0-9]*)-s([0-9][0-9]*)\.html(.*)$" => "/index.php?showtopic=$2&st=$3",
            "^/gallery\.html(.*)$" => "/index.php?automodule=gallery$1",
            "^/gallery[-_]cat([0-9]*)\.html(.*)$" => "/index.php?automodule=gallery&req=sc&cat=$1$2",
            "^/gallery[-_]image([0-9]*)\.html(.*)$" => "/index.php?automodule=gallery&req=si&img=$1$2",
            "^/gallery[-_]user([0-9]*)[-_]album([0-9]*)\.html(.*)$" => "/index.php?automodule=gallery&req=user&user=$1&op=view_album&album=$2$3",
            "^/gallery[-_]user([0-9]*)\.html(.*)$" => "/index.php?automodule=gallery&req=user&user=$1$2",
            "^/gallery[-_]slideshow[-_](.*)[-_]([0-9]*)\.html(.*)$" => "/index.php?automodule=gallery&req=slideshow&$1=$2$3",
            "^/gallery[-_]your[-_]favorites\.html(.*)$" => "/index.php?automodule=gallery&cmd=favs$3",
            "^/gallery[-_]your[-_]albums\.html(.*)$" => "/index.php?automodule=gallery&cmd=albums$3",
            "^/gallery[-_]stats\.html(.*)$" => "/index.php?automodule=gallery&req=stats$3",
            "^/blog\.html(.*)$" => "/index.php?automodule=blog$1",
            "^/blog[-_]main\.html(.*)$" => "/index.php?automodule=blog&req=ucp_main$3",
            "^/blog[-_]tracker\.html(.*)$" => "/index.php?automodule=blog&req=ucp_tracker$3",
            "^/blog[-_]b([0-9]*)\.html(.*)$" => "/index.php?automodule=blog&blogid=$1$2",
            "^/blog[-_]b([0-9]*)[-_]entry([0-9]*)\.html(.*)$" => "/index.php?automodule=blog&blogid=$1&showentry=$2$3",
            "^/blog[-_]older[-_]b([0-9]*)[-_]entry([0-9]*)\.html(.*)$" => "/index.php?automodule=blog&blogid=$1&showentry=$2&show=nextoldest$3",
            "^/blog[-_]newer[-_]b([0-9]*)[-_]entry([0-9]*)\.html(.*)$" => "/index.php?automodule=blog&blogid=$1&showentry=$2&show=nextnewest$3",
            "^/blog[-_]post[-_]b([0-9]*)\.html(.*)$" => "/index.php?automodule=blog&blogid=$1&req=postblog$2",
            "^/blog[-_]track[-_]b([0-9]*)\.html(.*)$" => "/index.php?automodule=blog&blogid=$1&req=dotrackblog$2",
            "^/blog[-_]stoptrack[-_]b([0-9]*)\.html(.*)$" => "/index.php?automodule=blog&blogid=$1&req=doendtrackblog$2",
            "^/blog[-_]rss[-_]feed[-_]b([0-9]*)\.html(.*)$" => "/index.php?automodule=blog&blogid=$1&req=syndicate$2",
            "^/blog[-_]archive[-_]b([0-9]*)\.html(.*)$" => "/index.php?automodule=blog&blogid=$1&req=showarchive$2",
            "^/blog[-_]addfavorite[-_]b([0-9]*)\.html(.*)$" => "/index.php?automodule=blog&blogid=$1&req=addfavblog$2",
            "^/blog[-_]delfavorite[-_]b([0-9]*)\.html(.*)$" => "/index.php?automodule=blog&blogid=$1&req=delfavblog$2",
            "^/blog[-_]reply[-_]b([0-9]*)[-_]entry([0-9]*)\.html(.*)$" => "/index.php?automodule=blog&blogid=$1&req=replyentry&eid=$2$3",
            "^/downloads\.html(.*)$" => "/index.php?automodule=downloads$1",
            "^/downloads[-_]cat([0-9]*)\.html(.*)$" => "/index.php?automodule=downloads&showcat=$1$2",
            "^/downloads[-_]file([0-9]*)\.html(.*)$" => "/index.php?automodule=downloads&showfile=$1$2",
            "^/downloads[-_]your[-_]files\.html(.*)$" => "/index.php?automodule=downloads&req=ucp_files$1",
            "^/downloads[-_]your[-_]favorites\.html(.*)$" => "/index.php?automodule=downloads&req=ucp_favs$1",
            "^/downloads[-_]your[-_]subscriptions\.html(.*)$" => "/index.php?automodule=downloads&req=ucp_subs$1",
            "^/downloads[-_]submit\.html(.*)$" => "/index.php?automodule=downloads&req=submit$1",
            "^/downloads[-_]search\.html(.*)$" => "/index.php?automodule=downloads&req=search$1",
            "^/downloads[-_]last[-_]ten\.html(.*)$" => "/index.php?automodule=downloads&req=search&code=last_ten$1",
            "^/downloads[-_]last[-_]visit\.html(.*)$" => "/index.php?automodule=downloads&req=search&code=last_visit$1",
            "^/downloads[-_]mod\.html(.*)$" => "/index.php?automodule=downloads&req=mod$1",
            "^/downloads[-_]author([0-9]*)\.html(.*)$" => "/index.php?automodule=downloads&req=search&code=all_author&id=$1$2",
            "^/(.*)[-_]t([0-9][0-9]*)[-_]s([0-9][0-9]*)\.html(.*)$" => "/index.php?showtopic=$2&st=$3",
            "^/(.*)[-_]t([0-9][0-9]*)\.html(.*)$" => "/index.php?showtopic=$2$3",
            "^/t([0-9][0-9]*)\.html(.*)$" => "/index.php?showtopic=$1$2",
            "^/findpost[-_]p([0-9][0-9]*)\.html(.*)$" => "/index.php?act=findpost&pid=$1$2",
            "^/start[-_]new[-_]topic[-_]f([0-9]*)\.html(.*)$" => "/index.php?act=post&do=new_post&f=$1$2",
            "^/add[-_]reply[-_]f([0-9]*)[-_]to([0-9]*)\.html(.*)$" => "/index.php?act=post&do=reply_post&f=$1&t=$2$3",
            "^/(.*)[-_]f([0-9][0-9]*)\.html(.*)$" => "/index.php?showforum=$2$3",
            "^/f([0-9][0-9]*)\.html(.*)$" => "/index.php?showforum=$1$2",
            "^/(.*)[-_]m([0-9]*)\.html(.*)$" => "/index.php?showuser=$2$3",
            "^/m([0-9][0-9]*)\.html(.*)$" => "/index.php?showuser=$1$2",
            "^/a([0-9][0-9]*)\.html(.*)$" => "/index.php?act=announce&id=$1$2",
            "^/a([0-9][0-9]*)[-_]in[-_]forum([0-9][0-9]*)\.html(.*)$" => "/index.php?act=announce&f=$2&id=$1$3",
            "^/(.*)[-_]a([0-9][0-9]*)\.html(.*)$" => "/index.php?act=announce&id=$2$3",
            "^/(.*)[-_]a([0-9][0-9]*)[-_]in[-_]forum([0-9][0-9]*)\.html(.*)$" => "/index.php?act=announce&f=$3&id=$2$4",
            "^/forums\.html(.*)$" => "/index.php?act=idx$1",
            "^/(.*)[-_]a[-_]private[-_]message[-_]m([0-9]*)\.html(.*)$" => "/index.php?act=Msg&CODE=4&MID=$2$3",
            "^/(.*)[-_]an[-_]email[-_]m([0-9]*)\.html(.*)$" => "/index.php?act=Mail&CODE=00&MID=$2$3",
            "^/logout\.html(.*)$" => "/index.php?act=Login&CODE=03$1",
            "^/login\.html(.*)$" => "/index.php?act=Login$1",
            "^/register\.html(.*)$" => "/index.php?act=Reg&CODE=00$1",
            "^/the[-_]moderating[-_]team\.html(.*)$" => "/index.php?act=Stats&CODE=leaders$1",
            "^/todays[-_]top[-_]20[-_]posters\.html(.*)$" => "/index.php?act=Stats$1",
            "^/member[-_]list\.html(.*)$" => "/index.php?act=Members$1",
            "^/online[-_]list\.html(.*)$" => "/index.php?act=Online$1",
            "^/online[-_]list[-_]listall\.html(.*)$" => "/index.php?act=Online&CODE=listall&sort_key=click$1",
            "^/online[-_]list[-_]members\.html(.*)$" => "/index.php?act=Online&CODE=listall&sort_key=name&sort_order=asc&show_mem=reg$1",
            "^/(.*)[-_]h([0-9]*)\.html(.*)$" => "/index.php?act=help&CODE=01&HID=$2$3",
            "^/(.*)help\.html(.*)$" => "/index.php?act=Help$2",
            "^/(.*)news\.html(.*)$" => "/index.php?act=home$2",
            "^/(.*)home\.html(.*)$" => "/index.php?act=home$2",
            "^/(.*)calendar\.html(.*)$" => "/index.php?act=Calendar$2",
            "^/(.*)calendar[-_]cal([0-9]*)\.html(.*)$" => "/index.php?act=Calendar&cal_id=$2$3",
            "^/my[-_]controls\.html(.*)$" => "/index.php?act=UserCP$1",
            "^/edit[-_]profile[-_]info\.html(.*)$" => "/index.php?act=UserCP&CODE=01$1",
            "^/edit[-_]signature\.html(.*)$" => "/index.php?act=UserCP&CODE=22$1",
            "^/edit[-_]avatar[-_]settings\.html(.*)$" => "/index.php?act=UserCP&CODE=24$1",
            "^/change[-_]personal[-_]photo\.html(.*)$" => "/index.php?act=UserCP&CODE=photo$1",
            "^/manage[-_]your[-_]attachments\.html(.*)$" => "/index.php?act=UserCP&CODE=attach$1",
            "^/manage[-_]ignored[-_]users\.html(.*)$" => "/index.php?act=UserCP&CODE=ignore$1",
            "^/email[-_]settings\.html(.*)$" => "/index.php?act=UserCP&CODE=02$1",
            "^/board[-_]settings\.html(.*)$" => "/index.php?act=UserCP&CODE=04$1",
            "^/change[-_]email[-_]address\.html(.*)$" => "/index.php?act=UserCP&CODE=08$1",
            "^/change[-_]password\.html(.*)$" => "/index.php?act=UserCP&CODE=28$1",
            "^/personal[-_]portal\.html(.*)$" => "/index.php?act=UserCP&CODE=personal_portal_form$1",
            "^/display[-_]names\.html(.*)$" => "/index.php?act=UserCP&CODE=dname_start$1",
            "^/manage[-_]friends\.html(.*)$" => "/index.php?act=UserCP&CODE=manage_friends$1",
            "^/compose[-_]new[-_]message\.html(.*)$" => "/index.php?act=Msg&CODE=04$1",
            "^/inbox\.html(.*)$" => "/index.php?act=Msg&CODE=01&VID=in$1",
            "^/sent[-_]items\.html(.*)$" => "/index.php?act=Msg&CODE=01&VID=sent$1",
            "^/saved[-_]pms\.html(.*)$" => "/index.php?act=Msg&CODE=20$1",
            "^/empty[-_]pm[-_]folders\.html(.*)$" => "/index.php?act=Msg&CODE=delete$1",
            "^/edit[-_]storage[-_]folders\.html(.*)$" => "/index.php?act=Msg&CODE=07$1",
            "^/pm[-_]buddies\.html(.*)$" => "/index.php?act=Msg&CODE=02$1",
            "^/archive[-_]messages\.html(.*)$" => "/index.php?act=Msg&CODE=14$1",
            "^/message[-_]tracker\.html(.*)$" => "/index.php?act=Msg&CODE=30$1",
            "^/new[-_]messages\.html(.*)$" => "/index.php?act=Msg&CODE=01$1",
            "^/view[-_]topic[-_]subscriptions\.html(.*)$" => "/index.php?act=UserCP&CODE=26$1",
            "^/view[-_]forum[-_]subscriptions\.html(.*)$" => "/index.php?act=UserCP&CODE=50$1",
            "^/ip[-_]tool\.html(.*)$" => "/index.php?act=UserCP&CODE=iptool$1",
            "^/member[-_]tool\.html(.*)$" => "/index.php?act=UserCP&CODE=memtool$1",
            "^/manage[-_]anoucements\.html(.*)$" => "/index.php?act=UserCP&CODE=announce_start$1",
            "^/get[-_]new[-_]posts\.html(.*)$" => "/index.php?act=Search&CODE=getnew$1",
            "^/get[-_]active\.html(.*)$" => "/index.php?act=Search&CODE=getactive$1",
            "^/search\.html(.*)$" => "/index.php?act=Search$1",
            "^/email_link\.html(.*)$" => "/index.php?act=Forward$1",
            "^/print\.html(.*)$" => "/index.php?act=Print$1",
            "^/boardrules\.html(.*)$" => "/index.php?act=boardrules$1",
            "^/rss[-_]([0-9]*)\.html(.*)$" => "/index.php?act=rssout&id=$1$2",
            "^/rss[-_]cal([0-9]*)\.html(.*)$" => "/index.php?act=rssout&type=calendar&id=$1$2",
            "^/rss\.html(.*)$" => "/index.php?act=rssout$1"
        )

Any Q's, reply here and i'll try and help - i've a bit of experience with getting IPB happy on lighty now biggrin.gif

P

This post has been edited by modaco: Oct 11 2007, 02:56 AM
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Collapse

> Similar Topics

    Topic Title Replies Topic Starter Views Last Action
No New Posts   0 admin 8,043 4th February 2007 - 08:41 AM
Last post by: admin
No New Posts   1 admin 3,100 3rd March 2007 - 06:22 AM
Last post by: admin
No New Posts   3 admin 2,169 21st November 2007 - 04:10 PM
Last post by: CMANNS
No New Posts   0 RSS Aggregator 546 20th March 2007 - 08:32 AM
Last post by: RSS Aggregator
No New Posts   4 fester 2,888 24th March 2007 - 04:41 PM
Last post by: WoLeRiNe`

Collapse

> Links to this thread

Page Date Hits
lighttpd mod_rewrite - Vyhledat Googlem 1st June 2007 - 09:36 AM 1
lighttpd mod_rewrite - Google Search 3rd June 2007 - 09:47 AM 1
convert from Lighttpd to Apache how? - Google Search 3rd June 2007 - 09:11 PM 1
lighttpd mod_rewrite - Google Search 4th June 2007 - 08:01 PM 1
rewrite rules lighttpd apache - Google Search 5th June 2007 - 09:09 AM 2
trailing slash lighttpd.conf - Google Search 5th June 2007 - 06:12 PM 1
lighttpd rewrite syntax apache - Google Search 5th June 2007 - 11:06 PM 1
lighttpd syntax mod_rewrite - Google Search 5th June 2007 - 11:11 PM 1
lighttpd mod rewrite - Google'da Ara 6th June 2007 - 07:52 AM 2
apache lighttpd rewrite - Google Search 7th June 2007 - 03:03 AM 1
convert apache rewrite rules to lighttpd - Google Search 9th June 2007 - 07:03 PM 1
lighttpd rewrite %1 - Google Search 12th June 2007 - 02:49 AM 1
lighttpd apache rewrite - Google Search 13th June 2007 - 01:58 AM 1
lighttpd mod_rewrite - Vyhledat Googlem 13th June 2007 - 07:20 AM 1
+lighttpd +mod_rewrite - Google Search 14th June 2007 - 10:43 PM 1
lighttpd mod_rewrite example - Google Search 14th June 2007 - 11:53 PM 1
lighttpd use mod_redirect with mod_rewrite - Buscar con Google 15th June 2007 - 01:17 PM 1
lighttpd mod rewrite - Buscar con Google 16th June 2007 - 05:45 PM 1
lighttpd rewrite help - Google Search 17th June 2007 - 12:19 AM 1
lighttpd mod_rewrite - Google Search 17th June 2007 - 02:07 AM 2


RSS Lo-Fi Version Time is now: 1st December 2008 - 08:29 PM