I know it's possible to setup this system using a code of code, and a lot of pain-in-the-butt to maintain virtual hosts, but is there a dynamic way where it checks to be sure the folders exist?
I'd like to setup a system where on a site the default URL would be www.domain.com
and it would look for public_html/live/
, but if I set dev.domain.com
it would look to public_html/dev/
, BUT if I setup dev-live.domain.com
it would look for public_html/dev/
and it would use the LIVE database.
I'd like it to be setup so I only have to create a new directory within public_html
in order to create a new subdomain, but still be able to maintain the ability to add -[INSERT_DB]