View Single Post
  #5  
Old 5th July 2009, 12:20
voidzero voidzero is offline
HowtoForge Supporter
 
Join Date: Mar 2009
Posts: 63
Thanks: 11
Thanked 3 Times in 3 Posts
Talking

My solution is this:
  • The maildomain (MX) is mail.somehost.com
  • When this domain is opened you normally get /var/www/index.html saying 'It Works!'
  • So I added this .htaccess file and set the default config to AllowOverride All (since it's only editable by root anyway):
Code:
RewriteEngine On
RewriteBase /
Options +FollowSymlinks
RewriteCond %{HTTP_HOST} ^mail\. [NC]
RewriteRule .* http://my-main-ispconfig-url/webmail/src/login.php [R=301,L]

Redirect /mail http://my-main-ispconfig-url/webmail/src/login.php
Now people can open the URL at http://mail.somehost.com and also, unconfigured but working domains can be opened at http://somehost.com/mail

Hope this helps!
Reply With Quote