on mites/lice:
A way to deter mites and lice from living on your chickens, make sure to keep the coop clean and clean out shavings often, especially in the nesting boxes. Also, let them free range to dust bathe. If they do not free range, provide new dirt for them to bathe in. This is something they naturally do to rid themselves of pests. Also, you can buy mite/lice chemical sprays to spray in the coop/on the chickens themselves. I am not a fan of this method due to all of the chemicals, but if the mites get really bad I will use these sprays.
On rodents:
Make sure that the coop is hole-less, and make sure there is a secure bottom to the coop or if there is no floor make sure the siding goes well into the ground so as to not allow rodents to burrow and dig holes into your coop. For deturing them my only advice is get a cat or two (I know this may sound cruel, but i think this is more humane and natural than setting traps)
Hope this helps!