no_one
August 27, 2020, 9:28pm
1
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
no_one
August 27, 2020, 9:45pm
3
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.
no_one
August 27, 2020, 9:47pm
5
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.
no_one
August 27, 2020, 10:00pm
8
So, i tried what you told me, but it’s not working
Can you visit the logs of your project? What do they say?
Also, I think you left out an o in your website.
no_one
August 27, 2020, 10:15pm
11
Where??
Also, what’s a log? I’m new to this thing ._.
no_one
August 27, 2020, 10:20pm
13
hu
all i got is a “serving at” and a bunch of URL numbers things
Can I see your server.js file?
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!
jenn
September 23, 2021, 3:25pm
20
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!