Ask coding questions

← Back to all posts
custom 404 error
lolfail (22)

Is it possible to create a custom 404 error? I tried ".htaccess", but it didn't work it only triggered repl.it's 404 error

Answered by webmunchster (7) [earned 5 cycles]
View Answer
Commentshotnewtop
webmunchster (7)

Yes there is! You need to use Ruby On Rails to make a custom 404. Edit the HTML file named 404.html!

mat1 (2513)

There is currently no way to create custom 404 errors for HTML repls. You can however, use a language with backend like ExpressJS or Python Flask to be able to access this. (Read their documentation for more details)

Please upvote my comment if it was helpful or useful. Thank you!