Ask coding questions

← Back to all posts
how can i remove the .html from my page
potatojs (847)

so i have a website containing two pages for example index.html and games.html when i go to games.html, i don't want .html to appear in the url of the page how can i do it?
for example
insted of:
i want:

Answered by Coder100 (18904) [earned 5 cycles]
View Answer
Coder100 (18904)

Hi, you can either use a backend or put it inside a folder. For example:
example.html becomes:


Then you just link it:

<a href="/example">click</a>
potatojs (847)

it says page not found,
i think i didn't do it the right way can you plz :) be more specific :)@Coder100

potatojs (847)

eh i don't think trying to change the spaghetti code of the website is a good idea here is a simplified one:

Coder100 (18904)

um you didn't change anything @potatojs

Coder100 (18904)

change game.html to index.html :/ didn't you see what i said @potatojs

potatojs (847)

nah i read it it's just hmmmnjhrbgzuvrrrbeb
thank you it worked :)

ADisappointment (0)

@Coder100 Bro i tried a lot of codes on the internet and none of them worked (probably also because i am still noob on coding), but yours worked, thanks you so much

InvisibleOne (3215)

You need to write a thingy that removes the .html. Check out this

potatojs (847)

is there a simpler way?

potatojs (847)

ok :(
thanks :)@BrownieBoi

potatojs (847)

yeah i found it to, but i'm waiting for coder100 that seems to have a simpler way, if not i'm going to use that one :[email protected]