Not sure if you free feed or not.. but with dogs that have issues with going to the bathroom inside.. it is better to not free feed. If you feed them in the morning and at night and then let them outside immediately after, they will get on a routine..

Our three go outside while I prepare their meals, they pee, and then they come in and eat. Then its right back outside for them, and they'll all three poop. Took about a week for Eli to get completely used to this schedule when we got him..

One thing with our Bunny is that if we let her have free roam of the house at night, she will --guarenteed-- pee and/or poop downstairs in front of our tv. We have a 2 story townhouse.. so we put up a baby gate at the top of the steps, she can wander around upstairs.. but not downstairs. And she's never peed or pooped upstairs. We've also, in the past, used leashes and tied them to our dresser legs. That was before the baby gate.

We also let them outside right before we go upstairs to go to bed and first thing in the morning after they wake up.

This is definitely not a quick fix.. but if you can figure out when he's going and make changes to prevent him from doing so, it can be solved. =)
Good luck!