Not signed in ( Sign In)

Categories

Welcome, Guest

Want to take part in these discussions? Sign in if you have an account, or apply for one below

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

    •  
      CommentAuthorMischa
    • CommentTimeMay 14th 2010 edited
     permalink
    Hi All,

    Not sure if there are people here that are running Lighttpd. But here is the LUA script that I am using.
    local real_file = lighty.stat(lighty.env["physical.path"])
    if (not real_file) then
    lighty.env["uri.path"] = "/index.php"
    lighty.env["physical.rel-path"] = lighty.env["uri.path"]
    lighty.env["physical.path"] = lighty.env["physical.doc-root"] .. lighty.env["physical.rel-path"]
    end

    You can also use the following if FlatPress is not in the root of your webserver.
    -- Prefix without trailing /
    local prefix = '/flatpress'

    local real_file = lighty.stat(lighty.env["physical.path"])
    if (not real_file) then
    lighty.env["uri.path"] = prefix .. "/index.php"
    lighty.env["physical.rel-path"] = lighty.env["uri.path"]
    lighty.env["physical.path"] = lighty.env["physical.doc-root"] .. lighty.env["physical.rel-path"]
    end

    I have added some additional redirects that have nothing to do with FlatPress, but if you are running only FlatPress within a '$HTTP["host"]' definition you can also just use:
    $HTTP["host"] == "<my-flatpress-host>" {
    server.document-root = "<path-to-my-flatpress-files>"
    url.rewrite-if-not-file = ( "^/(.*)$" => "/index.php?$1")
    }

    When you are running with '$HTTP["url"]', you are stuck with the LUA script.