Every time you take your dog back inside and he goes to potty on the floor you catch him again and take him back outside. Sometimes you have to leave your dog out longer. Eventually they will go potty outside.
They can't hold it in forever. Scold your dog when he starts to potty on the floor and immediately take him outside and tell him that he has to stay outside until he potties outside.
They'll eventually get it.