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 ?

Httqm
  • 225
  • 2
  • 10

1 Answers1

0

It makes the match case-insensitive.

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

Aaron Copley
  • 12,525
  • 5
  • 47
  • 68
  • 2
    I thought this was Lighttpd-specific and I learnt about regexp mode modifiers. Thank you @Aaron Copley – Httqm May 02 '19 at 13:16