如何使用Firebase将URL重写到另一个文件夹?
我想重写URL,例如如何使用Firebase将URL重写到另一个文件夹?,url,web,firebase,url-rewriting,firebase-hosting,Url,Web,Firebase,Url Rewriting,Firebase Hosting,我想重写URL,例如myweb.com/index并显示myweb.com/production/index.com的内容,我想对所有页面都这样做,它们将显示相同文件的内容,但在目录production中。 我的意思是,Firebase.json看起来像这样(当然这不起作用): { "hosting": { "public": "public", "cleanUrls": true, "rewrites": [ {
myweb.com/index
并显示myweb.com/production/index.com
的内容,我想对所有页面都这样做,它们将显示相同文件的内容,但在目录production
中。
我的意思是,Firebase.json
看起来像这样(当然这不起作用):
{
"hosting": {
"public": "public",
"cleanUrls": true,
"rewrites": [ {
"source": "**",
"destination": "/production/**"
}
]
}
}