try putting this in your /etc/httpd/sites/ file:
RewriteCond %{HTTP_HOST} ^mail\.domain\.com
RewriteRule ^(.*)$ http://domain.com/mail$1 [R,L]
under the rewrite section (if you have one, create one), eg:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteRule .* – [F]
RewriteCond %{HTTP_HOST} ^mail\.domain\.com
RewriteRule ^(.*)$ http://domain.com/mail$1 [R,L]
</IfModule>
then you also need to make sure that the rewrite module is
enabled in your /etc/httpd/httpd.conf file:
LoadModule rewrite_module libexec/httpd/mod_rewrite.so
(and then restart your web server.)
Comments are closed