What are some things I can do to prevent a miscarriage?

I had one a few years back and just found out I was pregnant. What are some things I can do to prevent it from happening again?