Good question!
Usually digging is something that high energy dogs do to relieve energy and boredom. You're going to need to supervise very carefully to keep them from doing it. I find jogging usually helps dogs who love to dig because it really exerts a lot of their energy. If you don't like jogging you could try biking next to a dog or roller blading. Swimming is another thing they may like.
If you can find a place where it's actually alright for them to dig, say in some sand somewhere (near said water) then by all means let them dig there. I like to make it so that it's okay to dig in appropriate places because it's obviously a blast for them. They just can't do it in the garden or places where it will wreak havoc. Make sure wherever you let them dig is an easy spot to fix afterwards. Really, rivers and oceans are great for that.
You can give them funner, more interesting things to do. These are the types of dogs who want to engage more and may be into learning more complicated tricks. Try doing games with them where you hide a treat under a cup and have them guess which one it is. Put them in a sit stay and go hide a few treats and then ask them to find them.
Aside from these things, if you don't want to be interactive like that, give them something that will occupy them such as a kong or other thing with frozen something in it. Bring along some of those 'doggy puzzles'.
You must redirect their attention as soon as they think of digging. Give them something way more interesting and interactive and they will be happy to use their brain in another way. Keep redirecting their attention and give them lots of pets and talk warmly to them as you do. Explain to them why you don't want them to dig in that spot. Be patient. Be kind.
Try to break the habit. Try loud noises every time they start to dig. Try playing with them when they start. Definitely don't give them food to stop them. They consider that a good thing.
I had a herding dog do it when he was bored. We distracted him to do other things and took him for more walks. It worked and he did not dig anymore. :)
More walks should be helpful also if in a hot climate dogs dig to find cool soil to lay in so we used a splash pool which helped.