Firebase Hosting, 404 Error not displayed.

709 views
Skip to first unread message

Arjunsinh Chauhan

unread,
Jun 28, 2016, 9:56:02 AM6/28/16
to Firebase Google Group
I am using firebase hosting to host my static website (https://goo.gl/4u78Ej)

Whenever I open any of non existing page(like /bla-bla/) it does not return 404 Error. 

I have already added 404.html file in my public directory. But it does return 404 error. 

Here is my json file. Am I missing something?

{
 
"database": {
   
"rules": "database.rules.json"
 
},
 
"hosting": {
   
"public": "public",
   
"rewrites": [
     
{
       
"source": "**",
       
"destination": "/index.html"
     
}
   
]
 
}
}


Michael Bleigh

unread,
Jun 28, 2016, 11:04:17 AM6/28/16
to Firebase Google Group

Your rewrite rules specifies to send all URLs to index.html -- when a rewrite rule matches It's considered a success so while that rule is there you won't get a 404.


--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/5911bc43-5b7c-417b-8972-a8ea74e14a94%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages