The rules are different in British English.
I used to believe that they were, and followed what I thought were the British rules, but whenever I’ve looked at style guides they haven’t made a distinction and have simply said that the punctuation goes inside the quotation marks, even when it isn’t part of the quotation. I’ve been inconsistent in practice: I’ve made an effort to comply with the style guides, but haven’t always been able to bring myself to follow a practice that to me seems illogical. I think I’ll go back to the way I used to do it. Thanks.