网站在vercel, 新增加一个域名,现在是旧域名old.com和新域名new.com都指向了这个vercel服务器的index.html。
现在我需要把旧域名old.com指向该服务器的old.html文件,此old.html文件与index.html在同一目录,用vercel.json文件来实现,vercel.json文件与index.html及old.html文件都在同一目录(根目录)。
测试的结果是json文件未生效,old域名没有指向old.html,仍然指向index.html。下面是vercel.json文件内容:
{
"rewrites": [
{
"source": "/",
"has": [
{
"type": "host",
"value": "new.com"
}
],
"destination": "/index.html"
},
{
"source": "/",
"has": [
{
"type": "host",
"value": "old.com"
}
],
"destination": "/old.html"
}
]
}
需要怎么操作能让old域名指向old.html文件 ?
ps:
怀疑是缓存问题,浏览器开启了隐私模式,old域名仍然指向index.html。