10
Sep

lighttpd下WordPress的Permalink Rewirte

  1. a Wordpress blog installed in the root of your (sub-) domain:
    $HTTP["host"] =~ “{yourdomain}” {
    var.app = “{yourdomain}”
    accesslog.filename = base + “/logs/” + app + “.access.log”
    server.errorlog = base + “/logs/” + app + “.error.log”
    load php app
    url.rewrite = (
    “^/(wp-.+).*/?” => “$0″,
    “^/(sitemap.xml)” => “$0″,
    “^/(xmlrpc.php)” => “$0″,
    “^/(.+)/?$” => “/index.php/$1″
    )
    }
  2. a Wordpress blog installed in a subfolder (e.g. /blog/)
    $HTTP["host"] =~ “{yourdomain}” {
    var.app = “{yourdomain}”
    accesslog.filename = base + “/logs/” + app + “.access.log”
    server.errorlog = base + “/logs/” + app + “.error.log”
    load php app
    url.rewrite = (
    “^/?$” => “/blog/index.php”,
    “^/blog/(wp-.+)$” => “$0″,
    “^/blog/xmlrpc.php” => “$0″,
    “^/blog/sitemap.xml” => “$0″,
    “^/blog/(.+)/?$” => “/blog/index.php/$1″
    )
    }
  3. may be you can add follow line in config file

     server.error-handler-404= “/index.php”

No Comments

Be the first to comment on this entry.

Leave a comment

Name(required)
Mail (will not be published)(required)
Website

Fields in bold are required. Email addresses are never published or distributed.

Some HTML code is allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
URLs must be fully qualified (eg: http://www.raecoo.com),and all tags must be properly closed.

Line breaks and paragraphs are automatically converted.

Please keep comments relevant. Off-topic, offensive or inappropriate comments may be edited or removed.

    About

    Tag Cloud