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
Comments
hotnewtop
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 https://my-crapy-atempt-at-a-game.donoldjtrump.repl.co/PAGENAME/

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: https://replit.com/talk/learn/Flask-Tutorial/141150

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

@app.errorhandler(404)
def page_not_found(e):
  return "Error 404 Page Not Found"