apache域名重定向rewrite

訪問域名gxc.bangfang.net 跳轉到www.gxc.ac.cnapp

<VirtualHost *:80> ServerName www.bangfang.netide

ServerAlias gxc.bangfang.net

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} ^gxc.bangfang.net [NC]

RewriteRule ^(.*) http://www.gxc.ac.cn$1 [R=301,L]
    </IfModule>

</VirtualHost>.net

相關文章
相關標籤/搜索