WordPress.org

Support

Support » Multisite » [Resolved] Rewrite rule for lighttpd

[Resolved] Rewrite rule for lighttpd

  • 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 http://sub.domain.com/page will go to http://domain.com Also, what I’ve noticed is that http://sub.domain.com/index.php is redirected to http://sub.domain.com, 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 ‘[Resolved] Rewrite rule for lighttpd’ is closed to new replies.
Skip to toolbar