Support » Networking WordPress » Rewrite rule for lighttpd

  • Resolved danielvijge


    I was using WordPress MU 2.9 on a lighttpd web server. I’m using subdomains for every blog. I had a working rewrite rule configured as:

    server.error-handler-404 = "/index.php"
    url.rewrite-once = (
        "^/(.*/)?files/$" => "/index.php",
        "^/(.*/)?files/(.*)" => "/wp-content/blogs.php?file=$2",
        "^(/wp-admin/.*)" => "$1",
        "^/([_0-9a-zA-Z-]+/)?(wp-.*)" => "/$2",
        "^/([_0-9a-zA-Z-]+/)?(.*\.php)$" => "/$2",

    Now I’ve installed WordPress 3.0 with multisite enabled. The rewrite rule doesn’t work for permalinks that do not include /index.php/. I’ve already changed the blogs.php to the new ms-files.php, and images are loaded without a problem.
    However, loading will go to Also, what I’ve noticed is that is redirected to, even without any rewrite rules. Not sure why WordPress does that, or if that causes the rewrite rules to fail.

    Anyone got permalinks in WordPress 3 with multisite working on Lighttpd?

Viewing 1 replies (of 1 total)
  • Yeah, solved it. The problem was not in the rewrite rules, but in the wp-config file. Both these must by in the config file:

    // enable multisite
    define('MULTISITE', true);
    // multisite for sub domains
    define('SUBDOMAIN_INSTALL', true);
Viewing 1 replies (of 1 total)
  • The topic ‘Rewrite rule for lighttpd’ is closed to new replies.