使用cloudfare将所有路径重定向到另一个URL

问题描述

我刚开始使用Cloudflare作为CDN。

我有两个域名分别为example.seexample.com的域,它们托管在一台具有相同数据的服务器中,两者都是同一站点。我想重定向所有路由,包含所有URL路径或查询字符串,从域结尾为.se到域结尾为.com。 例如:

example.se   -> example.com,example.se/ca  -> example.com/ca,example.se/ca/product  -> example.com/ca/product,example.se/ca/product?test=1  -> example.com/ca/product?test=1

我使用“页面规则”部分并添加如下重定向规则:

example.se/*   

然后设置为:

forwarding url      & 301 permanent redirect

to : https://www.example.com/$1

但是有了这个规则,重定向才可以申请:

example.se   -> example.com

不适用于其他路线。 如果您有经验,请帮助我。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)