It belongs in a museum and shouldn't be flown by government entities. Yes, it's a piece of history, and, yes, individuals have a right to display it if they so choose (although they are not protected from people's reactions to said display), but it's a sign of racism and treason. One could make the argument that the Civil War was about more than just slavery, but the people who argue that it wasn't about slavery at all are either willfully ignoring evidence, knowingly lying, or are just stupid.
As for retailers like Wal-Mart and Amazon refusing to sell merchandise with the Confederate flag on it, they have every right to do so. The people who are claiming that this somehow violates their rights are pretty funny to watch.
I'm from Alabama. I've stood on the exact spot where Jefferson Davis was inaugurated as the president of the Confederacy. (My freshman year of college, I could walk out the door of my dorm, go two-hundred feet, and be where the Stand in the Schoolhouse Door took place.) About three hours ago, the governor ordered the flags around the Confederate war memorial--which is located on the grounds of the Capitol--taken down. The media is covering it obsessively, mostly because it's a slow news day and because it fits into the national narrative, but really, no one down here cares about the Confederate flag other than a handful of crazy people. Most people are glad to see it go (not to the point of jumping up and down or anything, because, as I said, no one really gives much of a shit, but the reaction is generally positive).