Rallies are really the best way since you need to incorporate the ball's distance away from you when you hit a shot since you don't want the ball to be too close or too far which is done by having the right footwork. I mean off the court I can only suggest doing foot and running drills that improve your strength and stamina for your feet and legs which could translate to better footwork since you'll be more fit which would potentially allow you to stay fresh in a match so you don't get sloppy which is very common.

However, if you aren't satisfied, taking a personal video of your hitting session will definitely help you analyze where you can improve. One thing to try to incorporate in your footwork is to be bouncing a bit during rallies. Some players like Ferrer or Nadal bounce around a lot whereas someone like Djokovic is pretty calm at the back of the court only making a burst of movement when he makes the split step in order to react to the next shot. That split step can be very helpful in reaction properly and getting your feet in position for the shot.

In short, just a lot of on court practice is truly the best way to improve. Footwork can be very difficult for some players as many are naturally quite good whereas some certainly have poor footwork. Playing complementary sports like soccer can also help.