centos apache多域名301跳转 ,具体做法:
在空间上加一个文件: .htaccess(注意h前的点不要漏了),记得放到网站主目录下
1 RewriteEngine On
2 RewriteCond %{HTTP_HOST} ^centoscn.com [NC,OR]
3 RewriteCond %{HTTP_HOST} ^www.centoscn.com [NC]
4 RewriteRule ^(.*)$ http://www.helloswift.com.cn/$1 [L,R=301] |