If your cat is peeing on rugs or bathroom mats, you could also replace those with rugs/mats without a rubber bottom. We had a cat that peed on the bathroom mats all the time because of the rubber smell was associated with urin. We swapped to mats with cloth and the peeing stopped immediately.
Other cat develops crystals in her blatter, so she'd pee anywhere but the box, because she'd associated it with pain. Have to buy her special food to keep her PH balanced, but it's worth it.