Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firebase hosting is not honoring rewrite rules specified in firebase.json #534

Closed
nareshbhatia opened this issue Nov 11, 2017 · 4 comments
Closed

Comments

@nareshbhatia
Copy link

I'd like a request for logo.svg to be served by /logo.svg but everything else by /index.html (single page app). I have specified the rewrite rules for this as follows:

"rewrites": [
  {
    "source": "logo.svg",
    "destination": "/logo.svg"
  },
  {
    "source": "**",
    "destination": "/index.html"
  }
]

However pointing to /logo.svg gives a 404 from my app. So the first rewrite rule is not being honored.

@mbleigh
Copy link
Contributor

mbleigh commented Nov 11, 2017 via email

@nareshbhatia
Copy link
Author

Hi @mbleigh, thanks for the quick response. I tried your suggestion. It works if I use the firebase domain name, but doesn't with our real domain name. You can try here:

  1. https://slidesup-website.firebaseapp.com/logo.svg - this works
  2. https://slidesup.com/logo.svg - this doesn't

Please help.

@mbleigh
Copy link
Contributor

mbleigh commented Nov 11, 2017 via email

@nareshbhatia
Copy link
Author

You are right! It was a caching issue. Thanks so much for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants