.htaccess redirect all pages to new domain

前端 未结 18 2502
被撕碎了的回忆
被撕碎了的回忆 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:30

    From the usability point of view it would be better, if you also send the path with the request (i.e., what you have at the moment) and let your new site deal with it:

    You searched for "/products".

    Unfortunately this page is gone. Would you like to visit "/new_products" instead?

    (and better, still, doing this automatically.)

    This is obviously a lot of coding and heuristics for a larger website, but in my opinion it would pay off in terms of user satisfaction (when your carefully saved bookmark of your dream product just leads you to the front page of newdomain.com, this is frustrating.)

提交回复
热议问题