将apache.htaccess重写规则转换为lighttpd

将apache.htaccess重写规则转换为lighttpd,apache,rewrite,lighttpd,Apache,Rewrite,Lighttpd,我正在尝试将apache.htaccess重写规则转换为lighttpd: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f [NC] RewriteCond %{REQUEST_FILENAME} !-d [NC] RewriteRule ^(.*)$ index.php?q=$1&%{QUERY_STRING} [L] 通过访问url/projekt?test=test,apache中的print\r($\u GET)给出:

我正在尝试将apache.htaccess重写规则转换为lighttpd:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.*)$ index.php?q=$1&%{QUERY_STRING} [L]
通过访问url/projekt?test=test,apache中的print\r($\u GET)给出:

数组([q]=>projekt[test]=>test)

但如果我遵循我找到的将其转换为lighttpd的规则,则有以下规则:

url.rewrite-if-not-file = (
"^/([^.?]*)\?(.*)$" => "index.php?q=$1&$2"
)
数组变为:数组([q]=>projekt[?test]=>test)


如何更改lighttpd规则以删除?从变量中?

是否查看了请求处理
debug.log-request-handling=“enable”
您的正则表达式在我看来很不错,我只是建议您使用请求处理,因为它可以让您看到lighttpd在重写过程中做了什么。您需要指定一个错误日志。