Hi--
Caveat: I am not an Apache expert or webmaster by training or trade (C++ developer), so I expect this is a fairly obvious, newbie-level question. Apologies in advance.
I need an Apache 2.x rewrite rule that will map a requested domain into our domain as a subdomain.
Simplified Example(s):
domain1.com/index.php?option=80 -> domain1.masterdomain.com/index.php?option=80
www.domain1.com/index.php?option=99 -> domain1.masterdomain.com/index.php?option=99
domain2.com/index.php?option=33 -> domain2.masterdomain.com/index.php?option=33
www.domain2.com/index.php?option=44 -> domain2.masterdomain.com/index.php?option=44
I've tried a variety of suggested options, but so far, no joy. The latest attempt is:
RewriteRule ([^.]+)\.com(.*) http://$1.masterdomain.com [L]
Note: this lives in a virtual host that owns port 80 on a specific IP, so nothing else interesting going on in the VHost that I can see having any affect on this.
I believe my problem is all in my regex, but honestly, it's eluding me.
Any assistance would be much apperciated. I've been studying the Apache docs and all the Googled tips I can find, but I'm just not seeing it.
Thanks~