I need to be able to take a domain for example:
http://study.example.com will be masked to http://maindomain.com?site=study.example.com
But when customers view the page they will see http://study.example.com
If they we're to navigate to somewhere else on the site it will still show up something like
http://study.example.com/index.php?members/23566234 would basically become http://maindomain.com/index.php?members/23566234&site=study.example.com
Basically I have made it so that the first method works just fine with RewriteRules
RewriteCond %{HTTP_HOST} !^maindomain\.com
RewriteCond %{HTTP_HOST} (.+) [NC]
RewriteRule ^.*$ index.php?site=%1 [NC,L]
Works but my problem is simply the Images, is there a way to "Preserve" the rewrite to remain as maindomain.com but in the address bar its study.example.com?
Remember I will be having tons of domains to do this with not just a single one so I am trying to avoid Proxy and having to restart apache2 server everytime...