You have not read the law well then, because the November 13, 2001 Presidential Military Order gave the President of the United States the power to detain anyone suspected of connection to terrorists or terrorism as enemy combatants. As such, that person could be held indefinitely, without charges being filed against him or her, without a court hearing, and without entitlement to a legal consultant.
Many legal and constitutional scholars contended that these provisions were in direct opposition to habeas corpus, and the United States Bill of Rights. The case of Hamdi v. Rumsfeld re-confirmed the right of US citizens to habeas corpus even when declared an enemy combatant. (While the case contained many opinions, eight of the nine justices affirmed the basic principle that habeas corpus of a citizen could not be revoked.) The issue of aliens has been more complicated. While some argue that habeas corpus does not properly apply to noncitizens, US courts have also ruled that many rights under the Bill of Rights and the Fourteenth Amendment apply to "all persons", not just US citizens. In the case of Hamdan v. Rumsfeld, argued before the United States Supreme Court in March 2006, Salim Ahmed Hamdan petitioned for a writ of habeas corpus, challenging the lawfulness of Secretary of Defense Donald Rumsfeld's plan to try him for alleged war crimes before a military commission convened under special orders issued by the President of the United States, rather than before a court-martial convened under the Uniform Code of Military Justice. On June 29, 2006, in a 5-3 ruling the Supreme Court of the United States rejected Congress's attempts to strip the court of jurisdiction over habeas corpus appeals by detainees at Guantánamo Bay, although Congress had previously passed the Detainee Treatment Act (DTA), which took effect on December 30, 2005:
"Except as provided in section 1005 of the Detainee Treatment Act of 2005, no court, justice, or judge shall have jurisdiction to hear or consider an application for a writ of habeas corpus filed by or on behalf of an alien detained by the Department of Defense at Guantanamo Bay, Cuba." §1005(e)(1), 119 Stat. 2742.
Section 1005 does provide, however, a limited habeas corpus process:
"The jurisdiction of the United States Court of Appeals for the District of Columbia Circuit on any claims with respect to an alien under this paragraph shall be limited to the consideration of whether the status determination ... was consistent with the standards and procedures specified by the Secretary of Defense for Combatant Status Review Tribunals (including the requirement that the conclusion of the Tribunal be supported by a preponderance of the evidence and allowing a rebuttable presumption in favor of the Government's evidence), and to the extent the Constitution and laws of the United States are applicable, whether the use of such standards and procedures to make the determination is consistent with the Constitution and laws of the United States." §1005(e)(2), 119 Stat. 2742.
On 29 September 2006, the U.S. House and Senate approved the Military Commissions Act of 2006, a bill which would suspend habeas corpus for any alien determined to be an "unlawful enemy combatant engaged in hostilities or having supported hostilities against the United States"[2], [1] by a vote of 65-34. (This was the result on the bill to approve the military trials for detainees; an amendment to remove the suspension of habeas corpus failed 48-51.) President Bush signed the Military Commissons Act of 2006 into law on October 17, 2006.
With the MCA's passage, the law became more limited than the broader "alien detained ... at Guantanamo Bay":
"Except as provided in section 1005 of the Detainee Treatment Act of 2005, no court, justice, or judge shall have jurisdiction to hear or consider an application for a writ of habeas corpus filed by or on behalf of an alien detained by the United States who has been determined by the United States to have been properly detained as an enemy combatant or is awaiting such determination." §1005(e)(1), 119 Stat. 2742.
Under the MCA, the law restricts habeas appeals for only those detained as enemy combatants, or awaiting such determination; left unchanged is the provision that all such determinations are subject to appeal in U.S. Court, including a review of whether the evidence warrants the determination, which many scholars believe does protect the prisoner's right of habeas corpus: if the status is upheld, then their imprisonment is deemed lawful; if not, then the government can change the prisoner's status to something else, at which point the habeas restrictions no longer apply.
October 17, 2006, not October 18,2006 is 135 years to the day after the last American President suspended habeus corpus, President Bush signed into law the Military Commissions Act of 2006.