1

This article : https://www.cyberciti.biz/tips/lighttpd-mod_rewrite-redirect-hotlink-image.html mentions :

$HTTP["referer"] =~ ".*BADDOMAIN\.com.*|.*IMAGESUCKERDOMAIN\.com.*|.*blogspot\.com.*" {
    url.rewrite = ("(?i)(/.*\.(jpe?g|png))$" => "/hotlink.png" )
}

in the “url.rewrite” line, I understand the “change THIS into THAT” structure, but what exactly does the “(?i)” leading the regular expression chunk matching image files mean ?

I know Lighttpd has some specific regular expression syntaxes but can’t find this one in the documentation. I guess this could toggle a case-insensitive search, but I've been unable so far to confirm that.

Can anybody confirm / provide further details / point to the corresponding documentation ?

1 Answer 1

0

It makes the match case-insensitive.

https://www.regular-expressions.info/refmodifiers.html

1
  • 2
    I thought this was Lighttpd-specific and I learnt about regexp mode modifiers. Thank you @Aaron Copley
    – Httqm
    May 2, 2019 at 13:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .