What!? 404 error

http://autouoc.glitch.me/te
http://autouoc.glitch.me/127
http://autouoc.glitch.me/tuninn8

These get a 404, but i don’t:
https://bloop-beta.glitch.me/40a
https://bloop-beta.glitch.me/48y
https://bloop-beta.glitch.me/cpyqn8

I checked, and the first one has a 404.html file, i also have one but it doesn’t work!
Why!?

edit: I don’t know if i made it clear: They have a custom 404

Hey,

Based on the server headers of the bloop-beta project, it is a static site and right now you cannot set custom 404 pages for static sites. Very sorry about that!

If you want to make the bloop-beta project a Node project, open your terminal and run:

npm init && npm i express

what do you mean? Quick note: The autouoc website originated from github, and github supports custom 404 pages, does that have to do with anything?

The auotduc site appears to be an express site, if you add some code into your server.js file, you can setup 404 pages.

what code?.. can you help me? I only know html & css ._.

You might want to have a look at this:

If you have any trouble, just ask.

Ok, thanks :slight_smile:

1 Like

So, i tried what you told me, but it’s not working :frowning:

Can you visit the logs of your project? What do they say?

Also, I think you left out an o in your website.

Where??
Also, what’s a log? I’m new to this thing ._.

hu

all i got is a “serving at” and a bunch of URL numbers things

Can I see your server.js file?

Yup. it’s open-source

app.get('/', function(request, response) {
  response.sendFile(__dirname + '/views/index.html');
});

app.get('*', function(req, res){
  res.sendFile(__dirname + '/views/404.html');
});

Remove the /views part, and move your static HTML files to the views folder.

PS: If you are going to make your project open source, don’t let the public see passwords.

This is very creepy! I have experienced this glitch today!

This post was flagged by the community and is temporarily hidden.

1 Like

Hi there - if you’re experiencing an issue related to this but the answers here don’t help, create a new thread or email the project you’re trying to work with to support@glitch.com and we can help you out!