in reply to (OT) Directing webmail.somehost.com => smoehost.com/cgi-bin/webmail.pl using Apache

ServerAlias and a RedirectRule?
Untested and quickly written before I got my first coffee:
<host xyz> ServerName client.domain.com ServerAlias webmail.client.domain.com RewriteEngine on RewriteCond %{HOST_NAME} ^webmail.client.domain.com$ RewriteRule ^/$ http://webmail.client.domain.com/cgi-bin/webmail [ +L,R] </host>
I hope that helps to get you started.

regards,
tomte


Edit:Added the [L,R] part
Edit 2:AFAIK this works with http/1.1 Clients only, as http/1.0-clients don't send a Host-Header

  • Comment on Re: (OT) Directing webmail.somehost.com => smoehost.com/cgi-bin/webmail.pl using Apache
  • Download Code