I have the current rewrite rules.
RewriteCond %{HTTP_HOST} ^([^\.]+)\.domain\.com$ [NC]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^$ /s/index.php?s=%1 [L]
Basically, what this does is that it points test.domain.com to http://www.domain.com/s/index.php?s=test .
The 2nd line of code is to prevent http://www.domain.com from pointing to /s/index.php … (This is my main site)
However the above rules and code do not work for http://www.test.domain.com .
I want both test.domain.com and http://www.test.domain.com to point to http://www.domain.com/s/index.php?s=test.
Try this: