Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[CSEO 1] Using CommunitySEO with lighttpd (mod_rewrite rules) Rate Topic: -----

#1 User is offline   admin Icon

  • Administrator
  • PipPipPip
  • Group: Root Admin
  • Posts: 7,781
  • Joined: 25-January 07

Posted 09 March 2007 - 06:25 AM

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.

  • Open /etc/lighttpd/lighttpd.conf
  • Ensure mod_rewrite is uncommented in server.modules
    server.modules					 =   (
    																  "mod_rewrite",
    																  "mod_redirect",
       ...

  • Find
    # Rewrite

  • Add below
    $HTTP["host"] == "yourdomain.com" {
    yourdomain.com is your domain name without any http:// or trailing slash. For example, we would use "communityseo.com".

  • Add the contents of this attached file: Attached File  light.txt (5.53K)
    Number of downloads: 498

  • Close this host section with
    }

  • 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!
0

#2 User is offline   DDF Icon

  • Advanced Member
  • PipPipPip
  • Group: Customers
  • Posts: 111
  • Joined: 23-June 07
  • Gender:Male

Posted 23 September 2007 - 01:25 PM

could you update this with the latest rules.. i asume htaccess changed since march 9 when this article was posted..
0

#3 User is offline   admin Icon

  • Administrator
  • PipPipPip
  • Group: Root Admin
  • Posts: 7,781
  • Joined: 25-January 07

Posted 24 September 2007 - 04:38 AM

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).
0

#4 User is offline   modaco Icon

  • Advanced Member
  • PipPipPip
  • Group: Customers
  • Posts: 91
  • Joined: 19-July 07

Posted 10 October 2007 - 08:20 AM

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').

		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 :D

P

This post has been edited by modaco: 11 October 2007 - 02:56 AM

0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users