magnet-module + luaスクリプトを使用してみてください
magnet モジュールを lighttpd モジュールに追加します
server.modules = (
...
"mod_magnet",
...
)
lighttpd 仮想ホストの例:
$HTTP["host"] =~ "^(example.com)$" {
server.document-root = "/var/www/example.com/document_root"
magnet.attract-physical-path-to = ( server.document-root + "/rewrite.lua" )
}
document_root フォルダーに rewrite.lua ファイルを作成します (上記の設定に従って)
attr = lighty.stat(lighty.env["physical.path"])
if (not attr) 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
-- uncomment below for debug output to stdout
-- print ("final file is " .. lighty.env["physical.path"])
この投稿のクレジットは、netteフォーラム スレッドの「edke」ユーザーに贈られます
これも試してみる価値があるかもしれません(またはインスピレーションを得てください):http://www.guyrutenberg.com/2008/05/24/clean-urls-permalinks-for-wordpress-on-lighttpd/