Forum Moderators: phranque
# rewrite to our internal URL, not a redirect
RewriteCond ${HTTP_HOST} (www\.)?examplecustomer2\.com
RewriteRule ^/(.*)$ http://examplecustomer2.example.com/$1
[edited by: jdMorgan at 12:39 am (utc) on Apr 23, 2010]
[edit reason] de-linked hostname in code. [/edit]
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
RewriteCond %{HTTP_HOST} examplecustomer.com
RewriteRule ^/(.*)$ httq://examplecustomer.com/$1 [P]
When a request from the domain customerexample.com makes its way through the virtual host it needs have its domain name rewritten to customerexample.example.com.
When a user requests the URL example.com/something the rewrite needs to fetch content from /some-internal-path inside the server. simpler variant: request to foo.com needs to become foo.bar.com