But in a .htaccess file - is this possible? I realise I can’t use <VirtualHost> in the .htaccess file but is there a way to accomplish a similar thing using .htaccess? I guess I just need to direct incoming domain names to their correct hosting folders - which are:
/
/site-two
/site-three
/site-four
Eventually there will be 4 sites running off this hosting account and I’ve been playing around with this (which doesn’t seem to work):
Actually, your knowledge isn’t bad. It’s the simple fact that Apache cannot create a new VirtualHost and especially not from an .htaccess file!
If your host is offering cPanel (or another, similar control panel), then you can use that to create new VirtualHosts AND specify their document root directories.
Thanks David, the host uses Plesk and I can’t create virtual hosts on that account via the Plesk control panel - hence trying to find some way of doing this via .htaccess
So to recap, are you saying this isn’t possible via .htaccess? Just trying to figure this all out - have to go live on Friday!
This is a DNS question, NOT specific to Apache (and it cannot be resolved via .htaccess). If Plesk can’t do this (I’m sure it can - UNLESS your host has disabled this - look for subdomains), contact your host directly.