‘When Harry Met Sally’ original ending was sad

Rom-coms are all about meet-cutes, mix-ups and unexpected pairings.

Turns out, many of the movies themselves experienced exactly that on their way to the big screen, according to the new book “From Hollywood With Love: The Rise and Fall (and Rise Again) of the Romantic Comedy,” by Scott Meslow (Dey St.), out Feb. 1.

Here are surprising stories from six of the most beloved rom-coms of the past few decades.

‘When Harry Met Sally’

In the initial script for 1989 film “When Harry Met Sally,” the two title characters, played by Billy Crystal and Meg Ryan, went their separate ways at the end.

But a funny thing happened on the way to a bummer ending.

“From Hollywood With Love.”

Director Rob Reiner, after almost a decade of being single, fell in love.

“I just had them walking in opposite directions at the end,” Reiner says in the book.

“And then I met the woman who became my wife during the making of the movie, and I changed the ending.” (Reiner and his wife Michele married in 1989 and are still together.)

But the main characters of “When Harry Met Sally” are actually stand-ins for Reiner and the film’s writer, Nora Ephron, who spent many hours arguing about the differences between men and women when it comes to sex and relationships.

“Ephron wanted to know: What is it actually like to be a single man?” writes Meslow. “By which she meant, of course, ‘What are single men really thinking?’”

Director Rob Reiner (inset) almost gave “When Harry Met Sally” a break-up ending, until he himself fell in love during filming.©Columbia Pictures/courtesy Eve

By the time the script was complete, the character of Harry was such a stand-in for Reiner that the director initially refused to offer the part to Crystal — the obvious best actor for the role — because the two were best friends in real life.

“Rob’s only concern was, ‘Am I going to ruin a really good friendship by having a friend play Harry?’” casting director Jane Jenkins tells Meslow.

But after talking with actors including Richard Dreyfuss, Michael Keaton and Tom Hanks, it became clear that only Crystal could play the part “exactly as Reiner saw him: a note-perfect riff on himself, as channeled through a friend who knew him better than anyone.”

Cameron Diaz was initially uneasy about the hair gel scene from, “There’s Something About Mary,” but changed her mind once she saw how much everyone on set loved it.20th Century Fox

‘There’s Something About Mary’

In “There’s Something About Mary,” one of the biggest issues during production involved the film’s most notorious joke: Cameron Diaz accidentally using semen as hair gel.

The film’s writer/directors, the Farrelly Brothers, had been trying to make use of that gag for at least five years, since Peter Farrelly pitched it for an episode of “Seinfeld.” (It didn’t fly, but he and sibling Bobby did write the one where Jerry dates a virgin.)

Diaz, for one, had grave concerns.

“‘That’s, like, a potential career-ender,’” Peter Farrelly recalls the actress saying. 

The Farrellys told Diaz that if she didn’t like the way the scene wound up, it would be cut from the film. They also agreed to shoot it two ways — one with just a small hair bump; the other, as Meslow writes, “a massive, vertical spike of hair sticking straight up from Diaz’s forehead, described in the script as an ‘ACE VENTURA-STYLE WAVE’ and so rock-hard you could cut a diamond with it.”

While the first style might have preserved Diaz’s dignity. But the moment she left her trailer sporting the second version, the film’s crew burst into wild laughter, making the choice obvious. The rest is history.

Anne Hathaway (left) dropped out of “Knocked Up” after learning that real footage of childbirth would be used.

‘Knocked Up’

Anne Hathaway was initially cast as the woman Seth Rogen impregnates after a one-night stand in Judd Apatow’s “Knocked Up.” But she left the film once she learned of Apatow’s plans to use actual birth footage for her childbirth scene.

“Hathaway quit the role due in part to a brief scene during the climactic birth sequence of a baby crowning that — while not depicting Hathaway’s own vagina — would have been [edited] to give audiences the impression it was hers,” writes Meslow.  

(Hathaway later said she left the film because “having not experienced motherhood myself, I didn’t know how I was gonna feel about giving birth.”)

As it happened, Apatow’s plan to film an actual birth was later derailed by the State Labor Board of California, which would have required the newborn to have a worker’s permit — impossible, since one can’t be issued before you’re born.

So the film went ahead with Katherine Heigl as the female star — and no live birth footage, after all.

Despite Julia Roberts’ best efforts, Russell Crowe’s screen test for “My Best Friend’s Wedding” was a disaster.

‘My Best Friend’s Wedding’

For “My Best Friend’s Wedding,” the crucial role of Michael, the about-to-be-married best friend Julia Roberts realizes she’s in love with, is played by Dermot Mulroney. Other actors considered for the role included Matthew McConaughey, Edward Burns and Matthew Perry — who wasn’t cast because he and Roberts were dating in real life and director P.J. Hogan was nervous about them breaking up.

But Hogan most wanted Russell Crowe for the role, because the director considered him “probably the most amazing actor I had ever encountered.”

Roberts, however, had casting approval, and a reading was arranged to see if she and Crowe had chemistry. The result, according to Hogan, was one of the worst table reads he had ever experienced.

“Russell was seated opposite Julia. He gripped that script, and he stared at that script, and he didn’t look at her once. He read every line in a monotone,” Hogan says in the book. “At one point, Julia was literally leaning over the table, staring, like, inches from Russell’s face, trying to make eye contact. And he wouldn’t look at her.”

Hugh Grant had a surprising — and furry — audience for his “Four Weddings and a Funeral” audition.Gramercy Pictures

‘Four Weddings and a Funeral’

Hugh Grant was not initially in the running for the male lead in “Four Weddings and a Funeral.” In fact, up to that point, the actor’s career was so bomb-filled that he thought his manager had made a mistake by accidentally sending him a good script.

Writer Richard Curtis, like many rom-com screenwriters, had modeled the main character on himself. As such, he expected to cast an actor who was not quite so handsome. He actually had Alan Rickman in mind. (The film’s director, Mike Newell, later called this idea “an absurdity.”)

But Grant’s eventual casting was also surprising because his first audition was a disaster.

“It was in the Jim Henson studio for some reason,” says Grant in the book, possibly forgetting that the film’s producer was a Henson company executive, “and in front of the writer, director, producer and 50 full-size Muppets, which was unsettling, I read the speech I had made at my brother’s wedding, which I thought would charm them but I think it slightly sickened them.”

While he was correct — only Newell had been charmed — he not only captured the role, he won over Curtis so intensely that he became the writer’s on-screen doppelgänger in four more films.

Henry Golding’s Instagram account landed the travel-show host a lead role in “Crazy Rich Asians.”AP

‘Crazy Rich Asians’

Sometimes, the star of a hit rom-com isn’t an actor at all.

After a fruitless search for the male lead in the groundbreaking rom-com “Crazy Rich Asians,” Henry Golding emerged after being recommended by the film’s accountant — who had swooned while watching him present at an awards show.

At that point, Golding had never acted, and was known only for hosting travel shows across Asia. But he had a prolific Instagram account, and that is how director Jon M. Chu came upon his star — who, as it happened, had just gotten married.

“Chu checked out Golding’s Instagram account, not expecting to be wowed, and found himself utterly entranced by Golding’s self-shot videos about food and cats,” Meslow writes.

“With the lead role in ‘Crazy Rich Asians’ in the balance, [Golding] cut his honeymoon short to shoot a screen test, and landed the role.”