Oh wow. It turns out I had this extremely close to correct. Revision below is working correctly. My primary problems were:
:e scp://<shortname>//etc/httpd/conf/vhosts/vh.conf
in vim, although it says the console returned 1, doesn't actually update files that needsudoedit
privileges. Total boneheaded mistake. Usingsudoedit
or similar in ssh console was needed to actually make modifications that need root.- I had no idea that browser cache played a role in remembering redirection, so things just weren't behaving properly.
I am leaving this with information in case anybody else needs to do similar.
vhosts.conf
<VirtualHost *:80>
ServerName example.com
...
</VirtualHost>
<VirtualHost *:80>
ServerName a.example.com
...
</VirtualHost>
<VirtualHost *:80>
ServerName b.example.com
...
</VirtualHost>
<VirtualHost *:80>
ServerName www.example.com
ServerAlias *.example.com
Redirect permanent / http://example.com
</VirtualHost>
Issue 1 Solution
Clearing my browser cache solved this issue. It actually works as expected.
Issue 2 Solution
Match a CNAME or A record wildcard domain in the last VirtualHost that does the redirect. It must be last because the VirtualHosts are matched in order. So any subdomains that have not already matched (exist), will be caught by the wildcard and like the www be redirected.
I still have some reservations about doing the wildcard match permanently due to the possible addition of subdomains later, but the effect of this may be minimal or nothing to SEO.