I want to create a 404 page for my website I made in repl.it, which is a web-editor.
It can either redirect to a page like website.repl.co/404
when the URL is not valid or directly show something representing 404.
The problem is, well, I don't know how to do something when there is such a situation.
I guess using javascript and an extra module to control it?
if(!validate(page.link)){ //checking if validating resulted false
//redirect to the 404 page (location.replace('/404.html') works i guess)
or
if(!validate(page.link)){ //checking if validating resulted false again
//show some html here
Aucun commentaire:
Enregistrer un commentaire