Ask coding questions

← Back to all posts
.htaccess file
DonoldJTrump (10)

I sit possible to write custom .htaccess in HTML CSS js repels?

mine can be found at cd .. && cat .htaccess
ruiwenge2 (1107)

i dont think it would work. if you dont want the page to end with .html, just create a folder with that page name and create a file called index.html inside that folder

then you'll be able to access the page at

DonoldJTrump (10)

@ruiwenge2 I know, but what about custom error pages

ruiwenge2 (1107)

@DonoldJTrump you can use flask, a web framework in Python, to do that. heres a tutorial i made about flask:

to make an error 404 page, do this in the flask code:

def page_not_found(e):
  return "Error 404 Page Not Found"