MyBB Community Forums

Full Version: [lighttpd] .htaccess not work / mod_rewrite not work
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
/.htaccess
url.rewrite = (
    # ...other rewrite rules go here...

    "^/MyBB/forum-([0-9]+)\.html(\?(.*)|)$" => "/MyBB/forumdisplay.php?fid=$1&$3",
    "^/MyBB/forum-([0-9]+)-page-([0-9]+)\.html(\?(.*)|)$" => "/MyBB/forumdisplay.php?fid=$1&page=$2&$4",
    "^/MyBB/thread-([0-9]+)\.html(\?(.*)|)$" => "/MyBB/showthread.php?tid=$1&$3",
    "^/MyBB/thread-([0-9]+)-page-([0-9]+)\.html(\?(.*)|)$" => "/MyBB/showthread.php?tid=$1&page=$2&$4",
    "^/MyBB/thread-([0-9]+)-lastpost\.html(\?(.*)|)$" => "/MyBB/showthread.php?tid=$1&action=lastpost&$3",
    "^/MyBB/thread-([0-9]+)-nextnewest\.html(\?(.*)|)$" => "/MyBB/showthread.php?tid=$1&action=nextnewest&$3",
    "^/MyBB/thread-([0-9]+)-nextoldest\.html(\?(.*)|)$" => "/MyBB/showthread.php?tid=$1&action=nextoldest&$3",
    "^/MyBB/thread-([0-9]+)-newpost\.html(\?(.*)|)$" => "/MyBB/showthread.php?tid=$1&action=newpost&$3",
    "^/MyBB/thread-([0-9]+)-post-([0-9]+)\.html(\?(.*)|)$" => "/MyBB/showthread.php?tid=$1&pid=$2&$4",

    "^/MyBB/post-([0-9]+)\.html(\?(.*)|)$" => "/MyBB/showthread.php?pid=$1&$3",

    "^/MyBB/announcement-([0-9]+)\.html(\?(.*)|)$" => "/MyBB/announcements.php?aid=$1&$3",

    "^/MyBB/user-([0-9]+)\.html(\?(.*)|)$" => "/MyBB/member.php?action=profile&uid=$1&$3",

    "^/MyBB/calendar-([0-9]+)\.html(\?(.*)|)$" => "/MyBB/calendar.php?calendar=$1&$3",
    "^/MyBB/calendar-([0-9]+)-year-([0-9]+)\.html(\?(.*)|)$" => "/MyBB/calendar.php?action=yearview&calendar=$1&year=$2&$4",
    "^/MyBB/calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)\.html(\?(.*)|)$" => "/MyBB/calendar.php?calendar=$1&year=$2&month=$3&$5",
    "^/MyBB/calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)-day-([0-9]+)\.html(\?(.*)|)$" => "/MyBB/calendar.php?action=dayview&calendar=$1&year=$2&month=$3&day=$4&$6",
    "^/MyBB/calendar-([0-9]+)-week-(n?[0-9]+)\.html(\?(.*)|)$" => "/MyBB/calendar.php?action=weekview&calendar=$1&week=$2&$4",

    "^/MyBB/event-([0-9]+)\.html(\?(.*)|)$" => "/MyBB/calendar.php?action=event&eid=$1&$3",
)

forum not auto redirect to /thread-11870.html
only redirect /showthread.php?tid=11870

help me please
For lighttpd, you can't just use a .htaccess file - you have to add the configuration to your vhost setup (likely found somewhere around /etc/lighttpd/ - setups vary).
Quote:Note: If your problem is about your site and not this site then this is the wrong section.

Wrong place...
http://redmine.lighttpd.net/projects/lig...ModRewrite should help you...