Using Special:LinkSearch on en.Wikipedia, searching for
thegazette.co.uk [a]
and
www.thegazette.co.uk/London/issue/ [b]
each get 1000s of hits (the former including URLs both with and without "www."), but searching for:
thegazette.co.uk/London/issue/ [c]
only gets 2.
Clearly it is reasonable to expect that the latter search should return all links that match thegazette.co.uk/London/issue/* or www.thegazette.co.uk/London/issue/*
User:Anomie has kindly explained [d]:
Looks like the behavior prior to 2023 did the expected thing for searches like (1) example.com, (2) *.example.com, and (3) example.com/some/path, but for (4) *.example.com/some/path it would ignore the path part, giving the same results as (2). In 889575 [e], the "new" code path (accidentally?) did the right thing for (4), but broke both (1) and (3) by treating them like (2) and (4), i.e. treating every domain as if it had the *. prefix. Later 936769 [f] reversed that breakage, treating (2) and (4) as if they were (1) and (3), i.e. breaking the *. prefix search entirely. Finally 937067 [g] settled on the current brokenness, treating (1) like (2) but (4) like (3), i.e. forcing *. if there's no path given and ignoring it if there is.
a - https://en.wikipedia.org/wiki/Special:LinkSearch?target=thegazette.co.uk
b - https://en.wikipedia.org/wiki/Special:LinkSearch?target=www.thegazette.co.uk%2FLondon%2Fissue%2F
c - https://en.wikipedia.org/wiki/Special:LinkSearch?target=thegazette.co.uk%2FLondon%2Fissue%2F
d - https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)#Link_search_oddity
e - https://gerrit.wikimedia.org/r/c/889575/