我正在尝试将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($ _ GET)给出:
数组([q] => projekt [test] =>测试)
但是,如果我按照我发现的将其转换为lighttpd的规则,则遵循以下规则:
url.rewrite-if-not-file = (
"^/([^.?]*)\?(.*)$" => "index.php?q=$1&$2"
)
数组变为:数组([q] => projekt [?test] => test)
如何更改lighttpd规则以删除?从变量?