Domestic diva Martha Stewart didn’t only allegedly stitch up Macy’s with her JCPenney deal, she also knifed her rivals, including Oprah Winfrey and Rosie O’Donnell, by banning them from doing business with the retail giant.

Hidden in the SEC filing for the Martha Stewart Living Omnimedia/JCPenney deal is a clause that lists her competitors and insists they cannot do business with JCPenney.

The clause in the agreement reads, “Competitive Product means any product . . . associated with Oprah Winfrey, Ina Garten (including Barefoot Contessa), The Food Network, Real Simple, Better Homes and Gardens, epicurious.com or Rosie O’Donnell.”

It concludes, “Neither JCP nor any of its Affiliates shall manufacture, market, promote, sell or distribute any Competitive Product.”

A source familiar with the deal told us: “Martha is knifing some of the people that have offered her a lot of support over her career. Rosie O’Donnell actually went to her trial to show public support, and has appeared several times on her talk show.

“Oprah Winfrey famously had Martha on her syndicated talk show post-jail, as a way of support, allowing Martha to promote her magazine and her products,” our insider said.

The source added that Garten “is the hardest pill to swallow for Martha,” as they were friends for years and she even wrote the foreword to Ina’s debut book, “The Barefoot Contessa.” But Garten ditched Martha for the producers of Nigella Lawson’s show to create her popular TV show.

This week, Macy’s, JCPenney and Stewart’s Omnimedia have been ordered into mediation as New York state Judge Jeffrey Oing, who’s overseeing the dispute over which store can sell Martha Stewart branded goods, adjourned the case.

A rep for Stewart said “It is standard business practice for partnership agreements involving celebrity-endorsed brands to include terms related to competitive products . . . This does not change the fact that Martha is a friend and huge supporter of all of the people mentioned.”