The following is the technique I use to do subdomain redirects on a web server hosting multiple sites using host headers. For example lets say you have a web server that hosts www.abc-test1.com and xyz-test2.com. You want all subdomain requests to return 301 redirects to the main domain.
Harcourt is a city in Webster County, Iowa, United States. The population was 340 at the 2000 census. Harcourt is located at 42Â°15â²43â³N 94Â°10â²36â³W / 42.26194Â°N 94.17667Â°W / 42.26194; -94.17667 (42.262056, -94.176589). According to the United States Census Bureau, the city has a total area of 0.6 square miles (1.5 kmÂ²), all of it land.
When the Illinois Central Railroad was built in Calhoun County in 1870, the counties northern towns of Manson and Pomeroy had grown and become rivals of Lake City for the county seat. In 1876, this came to a head and it was voted to put the courthouse as near the center of the county as possible.