.htaccess文件中写入

单一地址跳转

Redirect /olddomain http://newdomain

正则跳转

RedirectMatch 301 ^(.*)$ http://newdomain$1

如果开启mod_rewirite

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} !^olddomain\.com
RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=301,L]

 

相关文章:

  • 2022-03-10
  • 2021-08-05
  • 2022-12-23
  • 2022-01-26
  • 2021-11-07
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-05-17
  • 2022-12-23
  • 2021-09-01
  • 2021-10-18
相关资源
相似解决方案