redirect email url

Here is what the Directives now looks like:

SuexecUserGroup "#504" "#505"
ServerName mydomain.com
ServerAlias www.mydomain.com
ServerAlias lists.mydomain.com
DocumentRoot /home/domain_name/public_html
ErrorLog /home/domain_name/logs/error_log
CustomLog /home/domain_name/logs/access_log combined
ScriptAlias /cgi-bin/ /home/domain_name/cgi-bin/
ScriptAlias /awstats /home/domain_name/cgi-bin
DirectoryIndex index.html index.htm index.php index.php4 index.php5
RewriteEngine On
RewriteCond %{HTTP_HOST} ^mail.your_domain.com$ [NC]
RewriteRule ^(.) http://mail.your_domain.com/horde
<Directory /home/domain_name/public_html>
Options Indexes IncludesNOEXEC FollowSymLinks ExecCGI
allow from all
AllowOverride All
AddHandler fcgid-script .php
AddHandler fcgid-script .php4
AddHandler fcgid-script .php5
FCGIWrapper /home/domain_name/fcgi-bin/php5.fcgi .php
FCGIWrapper /home/domain_name/fcgi-bin/php4.fcgi .php4
FCGIWrapper /home/domain_name/fcgi-bin/php5.fcgi .php5
</Directory>
<Directory /home/domain_name/cgi-bin>
allow from all
</Directory>
<Files awstats.pl>
AuthName "mydomain.com statistics"
AuthType Basic
AuthUserFile /home/domain_name/.awstats-htpasswd
require valid-user
</Files>
PerlRequire /etc/webmin/virtualmin-google-analytics/apachemod.pl
PerlOutputFilterHandler Virtualmin::GoogleAnalytics
RedirectMatch /cgi-bin/mailman/([^/]
)(.) "https://mydomain.com:10000/virtualmin-mailman/unauthenticated/$1.cgi$2"
RedirectMatch /mailman/([^/]
)(.*) "https://mydomain.com:10000/virtualmin-mailman/unauthenticated/$1.cgi$2"
Alias /pipermail "/var/lib/mailman/archives/public"
php_value memory_limit 32M
RemoveHandler .php
RemoveHandler .php4
RemoveHandler .php5
IPCCommTimeout 31
<Directory "/home/domain_name/horde">
</Directory>

Oh oops :slight_smile:

Try this instead of what I said earlier:

[code:1]
RewriteEngine On
RewriteCond %{HTTP_HOST} ^mail.your_domain.com$ [NC]
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^(.*) http://mail.your_domain.com/horde
[/code:1]

We don’t want all requests going to mail.your_domain.com being redirected, only those going to “/” – and adding in the above REQUEST_URI condition should fix that.
-Eric

I did this by adding the following to my Apache configuration for those domains that required it:

ServerAlias mail.domain.tld
RewriteEngine On
RewriteCond %{HTTP_HOST} ^mail.domain.tld [NC]
RewriteRule ^(.*) http://www.domain.tld/horde [L,R]

You go to "Configure Website" and then "Edit Directives" and you can pretty much cut and paste those lines :slight_smile: