How to respond 404 (not redirect to a page)

Hi, I have been given a website that was hacked and setup for phishing.

All is well now (thanks to RS) but to clear the warnings, I must configure to send 404 when the naughty links are visited.

eg when visiting this!+&.php/enterpassword.php
send back 404, not an empty page

the site is running on node.js, so I am currently looking at my react-router-dom plugin to see if it can trigger a server 404…

any pointers would be appreciated

easiest way appears to be to change the rewrites rules.
With firebase hosting, the following will 404 on all routes not exactly /
(the default is “**”)

“rewrites”: [
“source”: “/”,
“destination”: “/index.html”

Hi do you have seen this


Regarding hosting. Here’s a good basic tutorial for publishing PWA into Firebase hosting

1 Like