Firebase重定向到相同的路径名
如何在Firebase JSON文件中添加脚本或类似内容以重定向到不同的域,但路径相同 例如:我的用户当前正在访问mydomain.com/help/page\u id\u 1 这里第1页是动态id 我想重定向到support.mydomain.com/help/page\u id\u 1Firebase重定向到相同的路径名,firebase,firebase-hosting,Firebase,Firebase Hosting,如何在Firebase JSON文件中添加脚本或类似内容以重定向到不同的域,但路径相同 例如:我的用户当前正在访问mydomain.com/help/page\u id\u 1 这里第1页是动态id 我想重定向到support.mydomain.com/help/page\u id\u 1 我可以在firebase.json文件中作为重定向执行此操作吗?是的!看起来是这样的: { "hosting": { "redirects": [{ "source": "/help/
我可以在firebase.json文件中作为重定向执行此操作吗?是的!看起来是这样的:
{
"hosting": {
"redirects": [{
"source": "/help/:page",
"destination": "https://support.mydomain.com/help/:page",
"type": 301
}]
}
}