访问域名redmine.xx.com 跳转到redmine.xx.net
<VirtualHost *:80>
ServerName redmine.xx.com
# ServerAlias redmine.xx.com
DocumentRoot /var/www/app/redmine/public/
ErrorLog logs/redmine_error_log
<Directory /var/www/app/redmine/public/>
Options -MultiViews
Options ALL
Order allow,deny
Allow from all
AllowOverride All
</Directory>
<IfModule mod_rewrite.c>
RewriteEngine on
# RewriteCond %{HTTP_HOST} ^redmine.xx.com [NC]
RewriteRule ^(.*) http://redmine.xx.net$1 [R=301,L]
</IfModule>
</VirtualHost>
<VirtualHost *:80>
ServerName redmine.xx.net
DocumentRoot /var/www/app/redmine/public/
</VirtualHost>