This is not an easy task, first of all individual with this problem often will not realize about the problem until urine have developed in to some unpleasant smell that cam be very irritating.
Using dettol on the carpet can be a way to get rid of the smell, this would be great to use this method straight after the urine have been placed on the carpet. After spraying the carpet with dettol one should give some time for the solution to dried out and hoover afterwards. Thanks to destruction of bacteria by this detergent will be of great impact on the smell factor and therefore should get rid of the smell for good.
Dettol is very good solution do get rid of the smell that one can have problems removing otherwise, that is why it is important to see problem with pee like a bacterial problem rather then anything else.
Vinegar is other great solution for cleaning the urine out of the carpet, however one has to be looking at the possibility that it may bleach the carpet and therefore one should pretest this before actually applying the solution. for this you could refer to my other spot about using vinegar for carpet cleaning. One thing that you should have in mind is that you need to use vinegar of white nature. Once you have it you can mix it with ration of 1 to 2, one being the vinegar and two being the warm water. and there you have the cleaning solution for many smells and many other stains in the house.
Let me know is you have other methods, I’m sure that readers will be happy to see alternatives.