I'm wondering if this is possible:

There is a PHP framework and someone made several sites, which can be accessible like this:


I would like to somehow map DNS to point to each site independently, for example:

aaa.domain.com -> index.php/aaa
ccc.domain.com -> index.php/ccc

But DocumentRoot can't be specified this way. Is this possible?

1 Answer 1


This is possible using URL rewriting inside Apache. Other servers likely have the same functionality available, I just don't have personal experience with other servers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.