Redirect webmail.domain to Usermin

Having an issue with this on GPL.

I chosen to redirect webmail.domain to Usermin but notice that while webmail.domain redirects to Usermin but www.webmail.domain does not.

Is it possible to set it such that both do redirect?

Thanks<br><br>Post edited by: dayo, at: 2009/05/15 10:52

Yeah, only the one is redirected.

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".

“I’m also not really sure why it’s useful to have www at the front. ;-)”

I wouldn’t be the only person using the virtual servers and I am sure somebody will type “www.webmail.domain”.

I would have thought that just as one can visit websites either with www or not, that this should be the case for this redirect as well.

This applies to the admin redirect as well.

If I knew enough, I’ll call it a bug.

Hehehe…it’s definitely not a bug. :wink:

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:

My bank uses, but doesn’t work.

Google uses but doesn’t work. doesn’t resolve on doesn’t resolve on

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, 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.

Just goes to show how little I know lol.

Thanks for your help.

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. :wink: