If you want to redirect additional addresses, you could always add it in manually.
You can add custom Apache directives using the server templates, in System Settings -> Server Templates -> Default -> Apache Website, and you can add custom directives in the textbox labeled "Directives and settings for new websites".
-Eric
Whether one can visit websites with www is up to the administrator of the site. It’s convention, but it’s usually not used when there’s something else in front. Some examples I can think of, off the top of my head:
In fact, I can’t find a single “servicename.domain.tld” style address that does resolve on www.servicename.domain.tld.
You’re definitely an outlier in having a desire for this. I reckon if Google can get away with not resolving on www.mail.google.com, we can live with it.
Oh, yeah, this reminded me that you’d also have to add a BIND record. You’d need a CNAME for this address, or it will do what all of those addresses I just mentioned do, which is not resolve at all.
Obviously there is only one “magic” URL for this…so, you’d have to manually add it to the Server Templates.
So, you’d need to add a ServerAlias:
ServerAlias www.webmail.${DOM}
And then the Rewrite rules:
RewriteEngine on
RewriteCond %{HTTP_HOST} =www.webmail.${DOM}
RewriteRule ^(.*) https://${DOM}:20000/ [R]
Or, you could explicitly set the destination to your main domain instead of using ${DOM}:20000.
I’m not sure if having two RewriteEngine directives will cause breakage though…you should test it before leaving it setup this way in production. I’m not sure how it could be done if this extra directive causes a problem.
I’m also not really sure why it’s useful to have www at the front.