I responded in a different thread already but I believe it is relevant here too:
As someone who has spent several months in both Israel and Palestine (granted, this was in Bethlehem and Ramallah in the West Bank) and has given a lot of thought to this question, the unfortunate reality is that you cannot stop Hamas. No amount of concessions would get rid of Hamas, and giving more Israeli land to Gaza will only strengthen Gazan support for Hamas, as they would be one step closer to "liberating Palestine." However, Gaza would now be closer to Tel Aviv and Jerusalem, making the threat of rockets and missiles significantly more apparent. Combine that with a population more hopeful of reclaiming more land and larger, more difficult borders to patrol, and you have a recipe for greater bloodshed.
The current mission of the Israeli government is to "destroy Hamas," but you cannot destroy an ideology with violence alone. Even if Israel manages to kill most Hamas terrorists, the civilians of Gaza will witness this violence and destruction, making them even angrier than before. With leadership protected in Qatar and half the Gazan population under 18, Hamas will not struggle to convince impressionable civilians to join their cause. Israel has given 24 hours for over one million residents of Gaza City to evacuate to the south, a task that even the Israeli government knows is impossible. Once the ground invasion begins, IDF soldiers, Hamas terrorists, and many innocent civilians will die. Israel will secure their borders, Hamas will increase power, and the cycle will continue.
Many have tried to propose other Arab states taking Palestinians or annexing their land, but none are interested in that. When Jordan annexed the West Bank, the Palestinian Liberation Organization (PLO) caused a bloody civil war known as Black September, which led to the assassination of former prime minister Wasfi Tal. Jordan eventually kicked the Palestinians out. When Lebanon accepted Palestinians, the PLO caused the 1982 Lebanon War, causing the Palestinians to be kicked out again. When Kuwait took 400,000 Palestinians, they turned on Kuwait during the Gulf War, with the PLO supporting the Iraqi invasion of Kuwait. Again, Kuwait kicked out all of the Palestinians. Even if Egypt agreed to annex Gaza, this wouldn't change the ethnic identity of Palestinians and their desire to take over the entire Israel-Palestine region.
Ultimately, no country wants to get involved with Gaza because of Hamas, and the leaders of Hamas will continue to use Gazan citizens as pawns in a violent game with Israel. While it is very cynical, I cannot think of any other realistic solution besides continuing the cycle of violence. My heart breaks for the innocent civilians in Gaza who will likely continue to suffer for the rest of their lives.