One of my kitty's would pee in places he wasn't suppose to.  He ended up being diagnosed with urinary crystals and I've had to put him on a veterinary diet.  There hasn't really been any issues since starting him on the food to clear them.