So my host, Media Temple, allows for very easy subdomains by creating a folder of subdomainA.domain.com within the “domains” folder. (This is on the Grid Server package.) Whenever you go to subdomainA.domain.com, it checks for that folder, and displays that content; if no folder exists, it displays the content for your primary pages, domain.com.
Now, if I previously used a subdomain and delete it, people are now surfing my page at subdomainA.domain.com, but seeing all the content from my primary domain. In other words, you can go to any site from my host, type in jibberish like asdf.domain.com, and be served the main pages.
My question: Any way to use .htaccess to redirect anyone from asdf.domain.com to domain.com? Remember, the .htaccess file itself is being pulled from domain.com, since the random domain does not exist (or no longer exists, in my case). Or how would this be scripted in PHP?
Sorry for the really minor detail, I’m just curious about .htaccess since I already direct www.domain.com to just domain.com; is there a catch-all?