.htaccess redirect all pages to new domain

前端 未结 18 2505
被撕碎了的回忆
被撕碎了的回忆 2020-11-22 14:47

Which redirect rule would I use to redirect all pages under olddomain.example to be redirected to newdomain.example?

The site has a totally

18条回答
  •  南方客
    南方客 (楼主)
    2020-11-22 15:34

    Simple just like this and this will not carry the trailing query from URL to new domain.

    Options +FollowSymLinks
    RewriteEngine On
    RewriteBase /
    RewriteRule .* https://www.newdomain.com/? [R=301,L]
    

提交回复
热议问题