nginx to lighttpd detecting request headers

Posted by A.Jesin on Server Fault See other posts from Server Fault or by A.Jesin
Published on 2013-11-04T14:06:48Z Indexed on 2013/11/04 15:57 UTC
Read the original article Hit count: 174

Filed under:
|
|

I'm moving a site form Nginx to Lighttpd. I was able to move everything except these nginx rules

set $enc_type "";
if ($http_accept_encoding ~ gzip) {
    set $enc_type .gzip;
}
if (-f $request_filename$enc_type) {
    rewrite (.*) $1$enc_type break;
}

I think I can create the variable like this

var.enc_type = ""

in lighttpd but how do I check if the request header Accept-Encoding contains gzip

© Server Fault or respective owner

Related posts about nginx

Related posts about rewrite