While reading through your link in the comment, I found this part:
The most important revisions to the Death Star design made by Lemelisk were made to take into account and eradicate the technical flaws of the original battlestation which had enabled it to be destroyed during the Battle of Yavin. The first major change made in this redesign was the elimination of the two-meter-wide thermal exhaust port that was used to ignite a chain reaction in the main reactor of the first Death Star, destroying it.
So it's not the exact same flaw that destroyed the second Death Star.
And if I remember correctly, the Millenium Falcon (can't remember if he was the one who shot) escaped from the heart of the station, it wasn't an exhaust port right at the surface. They fired from the inside directly at the reactor core.
The pilots flew through a very tight passage to the center of the massive station, and detonated the core with well placed concussion missiles and proton torpedoes