2010-01-07 182 views
0

我想將子域網絡郵件重定向到該域的/ roundcube。這必須適用於Apache中的所有虛擬主機。將子域重定向到/文件夾

例子:

webmail.example.com必須指向example.com/roundcube

這怎麼可能[WWW。]?必須完成的服務器配置爲直接管理員:S

回答

3

mod_rewrite是你的朋友。

嘗試這樣的事情在你的Apache配置VirtualHost

RewriteEngine on 
RewriteCond %{HTTP_HOST}     ^webmail\.[^.]+\.[^.]+$ 
RewriteRule ^webmail\.([^.]+)\.([^.]+)$ http://www.$1.$2/roundcube [R=permanent] 

...並配置DNS指向webmail.example.com到同一臺服務器www.example.com

相關問題