QuickLinks -- Click here to rapidly navigate through this document
CONSENT OF INDEPENDENT ACCOUNTANTS
The Board of Directors
RLI Corp.:
We consent to the use of our reports incorporated herein by reference in this Registration Statement of RLI Corp. on Form S-8 (relating to the registration of 200,000 RLI Corp. Common Shares for the Nonemployee Directors' Stock Plan).
Our reports refer to a 2002 change in accounting principle related to adopting the provisions of Statement of Financial Accounting Standards (SFAS) 142, "Goodwill and Other Intangible Assets" and a 2001 change in accounting principle related to adopting the provisions of SFAS 133, "Accounting for Derivative Instruments and Hedging Activities."
/s/ KPMG LLP
Chicago, Illinois
July 26, 2004