Redirect all subdomains that are not on a list and non-SSL
<p>My website is setup so it accepts wildcard subdomains.</p>

<p>I want to ONLY allow a few subdomains that are in a list like:</p>

<pre><code>help.example.com
blog.example.com
</code></pre>

<p>If a request comes in for say:</p>

<pre><code>   asdf.example.com
</code></pre>

<p>I want to redirect the requests to:</p>

<pre><code>   www.example.com
</code></pre>

<p>Also, if a request comes in like:</p>

<pre><code>example.com
</code></pre>

<p>I want to redirect to:</p>

<p>www.example.com</p>

<p>How can I do this?</p>

<p>I will then also want to redirect any non-ssl to SSL domains.</p>