apache域名重定向rewrite

来源:互联网 发布:白虹软件倒闭 编辑:程序博客网 时间:2024/05/01 11:19

访问域名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>
0 1