最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Firebase Hosting firebase.json File Changes Not Showing Up - Stack Overflow

programmeradmin0浏览0评论

I've been using Firebase for a number of years to host a very simple static HTML site. I recently removed a page and would like to create a 301 redirect to an alternative page hosted on the same domain/account.

I did some research and found that firebase doens't support a conventional .htaccess file and to achieve redirects you need to edit the project's firebase.json file. I've amended my file to the below but nothing happens when I visit the old URL (I just get a 404 error). Can anyone spot anything I'm doing wrong?

 {
  "hosting": {
    "site": "project-name-goes-here",
    "public": "public",
    "ignore": ["..."],
    "redirects": [
      {
        "source": "/ssl-certificates.html",
        "destination": "/web-hosting.html",
        "type": 301
      }
    ]
  }
}
发布评论

评论列表(0)

  1. 暂无评论