I would like to create virtual sub domains for clients who will have websites with us but the websites will be served from a single url in reality for example;
Customer requests website robshop.mywebsite.com so we create that on the fly but the content is actually served from mywebsite.com/websites/index.php?website=robshop
How do i do this?
Also my setup is with PHP and cPanel / WHM server.
Here is the htaccess code i have tried so far;
RewriteEngine On
RewriteCond %{HTTP_HOST} ^robshop.instamob.co.uk
RewriteCond %{REQUEST_URI} !instamob.co.uk/websites/index.php?website=robshop
RewriteRule ^(.*)$ instamob.co.uk/websites/index.php?website=robshop$1 [L]