#1 rule.. don't have stinky shoes. Toss them out if they start to smell. Don't be that guy!!
#2 rule.. Pedag Terry Cloth Insoles. Your feet sweat all over... but you can have 1/2 a sock as an insole. They can be washed, and they are cheap enough to just toss and put in a new insole. You can also get Cedar wood insoles (Zederna is the brand I've used).. They feel (IMHO) amazing walking on... but they get trashed fast (at almost triple the price of Terry Cloth insoles).
#3 rule.. Pick the right shoes. If your feet cant breath, your feet are going to sweat. Leather + no socks is a guaranteed stink fest.
#4 rule.. If you think you need to 'spray' your shoes with something to make them smell better? You've failed at #2 and #3.. re-read rule #1.