MyBB Community Forums

Full Version: Friendly URLs [Lighttpd]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So I've just recently switched to Lighttpd Toungue
I enabled friendly URL in my adminCP and i followed this tutorial > http://community.mybb.com/thread-51759.html

Unfortunately the rewrite URL written in that thread don't work for me,  anyone willing to help me out?

Ubuntu 14.x
Lighttpd Latest
with Rewrite mod enabled.

Cheers
Can you post the relevant section of your configuration file?
What's your URL and config file?

EDIT: Beaten by Stefan Sad
My site is in /var/www/mybb
and the rewrite rule is
    
   
url.rewrite = (
    "^/-([0-9]+)\.html(\?(.*)|)$" => "/forumdisplay.php?fid=$1&$3",
    "^/-([0-9]+)-page-([0-9]+)\.html(\?(.*)|)$" => "/forumdisplay.php?fid=$1&page=$2&$4",
    "^/thread-([0-9]+)\.html(\?(.*)|)$" => "/showthread.php?tid=$1&$3",
    "^/thread-([0-9]+)-page-([0-9]+)\.html(\?(.*)|)$" => "/showthread.php?tid=$1&page=$2&$4",
    "^/thread-([0-9]+)-lastpost\.html(\?(.*)|)$" => "/showthread.php?tid=$1&action=lastpost&$3",
    "^/thread-([0-9]+)-nextnewest\.html(\?(.*)|)$" => "/showthread.php?tid=$1&action=nextnewest&$3",
    "^/thread-([0-9]+)-nextoldest\.html(\?(.*)|)$" => "/showthread.php?tid=$1&action=nextoldest&$3",
    "^/thread-([0-9]+)-newpost\.html(\?(.*)|)$" => "/showthread.php?tid=$1&action=newpost&$3",
    "^/thread-([0-9]+)-post-([0-9]+)\.html(\?(.*)|)$" => "/showthread.php?tid=$1&pid=$2&$4",
    "^/post-([0-9]+)\.html(\?(.*)|)$" => "/showthread.php?pid=$1&$3",
    "^/announcement-([0-9]+)\.html(\?(.*)|)$" => "/announcements.php?aid=$1&$3",
    "^/user-([0-9]+)\.html(\?(.*)|)$" => "/member.php?action=profile&uid=$1&$3",
    "^/calendar-([0-9]+)\.html(\?(.*)|)$" => "/calendar.php?calendar=$1&$3",
    "^/calendar-([0-9]+)-year-([0-9]+)\.html(\?(.*)|)$" => "/calendar.php?action=yearview&calendar=$1&year=$2&$4",
    "^/calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)\.html(\?(.*)|)$" => "/calendar.php?calendar=$1&year=$2&month=$3&$5",    "^/calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)-day-([0-9]+)\.html(\?(.*)|)$" => "/calendar.php?action=dayview&calendar=$1&year=$2&month=$3&day=$4&$6",
    "^/calendar-([0-9]+)-week-(n?[0-9]+)\.html(\?(.*)|)$" => "/calendar.php?action=weekview&calendar=$1&week=$2&$4",
    "^/event-([0-9]+)\.html(\?(.*)|)$" => "/calendar.php?action=event&eid=$1&$3",
    )
}
vhost (subdomain)

$HTTP["host"] == "mybb.mydomain.xyz" {
        
    server.document-root = "/var/www/mybb"
    accesslog.filename = "/var/log/lighttpd/mybb/access.log"
    server.errorlog    = "/var/log/lighttpd/mybb/error.log"
It's my test site, I'm just making my way up since i just started using lighttpd so this site isn't live, once i've got hang of it then i'm gonna migrate my apache site to lighttpd

http://mybb.mydomain.xyz
The first two rules are incorrect (missing "forum").
Try this:
url.rewrite = (
    "^/forum-([0-9]+)\.html(\?(.*)|)$" => "/forumdisplay.php?fid=$1&$3",
    "^/forum-([0-9]+)-page-([0-9]+)\.html(\?(.*)|)$" => "/forumdisplay.php?fid=$1&page=$2&$4",
Thanks Stefan, Do i insert the "forum" on all the other lines like you to the first two lines?
No, the other rules appear to be correct (just like in the thread you linked).