Banning by IP and custom 404 page on a project

Is it possible to replicate the 404 and 403 feature of .htacess in glitch in html of javascript?

all i will say, any web server defaults to 404.html if file is not found, all i can provide

Can’t really use .htaccess unless the server runs on apache, but glitch projects run on an nginx server

Yeah, thats what I heard. Is there a way to IP ban in html or PHP?

in php yes, but it involves HEAVY amounts of logic, and is painfully slow, so if people are fast enough, they can still access the site

@17lwinn So, I found this out, to make a 404 page type this.

app.get("*", (req, res) => 

Cool! How does it work?

PS it is also possible to ban people with express using

1 Like

@17lwinn Not for sure, but I know it does take 404 request and sends what you put. Basically like a normal path in express.

yeah, but somebody from @glitch_support recommended it a while a go