状态码:
*301: 永久重定向,域名跳转一定要用301,
对搜索引擎友好的。
302:临时重定向
在虚拟主机配置文件/usr/local/apache2/conf/extra/httpd-vhosts
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.test.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.aaa.com$
RewriteRule ^/(.*)$ http://www.dd.com/$1 [R=301,L]
</IfModule>
重启服务
/usr/local/apache2/bin/apachectl restart

相关文章:

  • 2021-08-27
  • 2022-01-02
  • 2021-09-12
  • 2021-08-27
  • 2022-01-23
  • 2021-12-24
猜你喜欢
  • 2022-12-23
  • 2021-09-11
  • 2021-06-08
  • 2021-09-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案