Configuring httpd.conf to handle wildcard domains and multiple scripts?
- by Steve
I have a full-blown site like:
http://www.example.com (uses index.php)
http://www.example.com/scriptA.php
http://www.example.com/scriptB.php
I now want to have the possibility of setting up subsites like:
http://alpha.example.com
http://alpha.example.com/scriptA.php
http://alpha.example.com/scriptB.php
From http://stackoverflow.com/questions/2844004/subdomain-url-rewriting-and-web-apps/2844033#2844033 , I understand that I have to do:
RewriteCond %{HTTP_HOST} ^([^./]+)\.example\.com$
RewriteCond %1 !=www
RewriteRule ^ index.php?domain=%1
But what about the other scripts like scriptA and scriptB? How do I tell httpd.conf to handle those properly as well?
How can I tell httpd.conf that handle everything after the 'forwardslash', exactly as it does on the main site, but pass a parameter flag like
?domain=alpha
(Cross posted at: http://stackoverflow.com/questions/11365566/configuring-httpd-conf-to-handle-wildcard-domains-and-multiple-scripts)