Redirect webmail.domain to Usermin

7 posts / 0 new
Last post
#1 Fri, 05/15/2009 - 10:51
dayo

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

Fri, 05/15/2009 - 11:36
andreychek

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 -&gt; Server Templates -&gt; Default -&gt; Apache Website, and you can add custom directives in the textbox labeled &quot;Directives and settings for new websites&quot;.
-Eric

Fri, 05/15/2009 - 12:01 (Reply to #2)
dayo

&quot;I'm also not really sure why it's useful to have www at the front. ;-)&quot;

I wouldn't be the only person using the virtual servers and I am sure somebody will type &quot;www.webmail.domain&quot;.

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.

Sun, 06/07/2009 - 07:54
Joe
Joe's picture

Obviously there is only one &quot;magic&quot; 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. ;-)

--

Check out the forum guidelines!

Fri, 05/15/2009 - 12:02
dayo

This applies to the admin redirect as well.

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

Fri, 05/15/2009 - 12:11 (Reply to #5)
Joe
Joe's picture

Hehehe...it's definitely not a bug. ;-)

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 online.wamu.com, but www.online.wamy.com doesn't work.

Google uses mail.google.com but www.mail.google.com doesn't work.

news.ycombinator.com doesn't resolve on www.news.ycombinator.com.

account.authorize.net doesn't resolve on www.account.authorize.net.

In fact, I can't find a single &quot;servicename.domain.tld&quot; style address that <i>does</i> 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.

--

Check out the forum guidelines!

Fri, 05/15/2009 - 12:26 (Reply to #6)
dayo

Just goes to show how little I know lol.

Thanks for your help.

Topic locked