Skip to content
Sign upLog in
← Back to Community

remove .html from file path

Profile icon
Codemonkey51Hacker

so you want to remove .html from the path

So I have seen a lot of people ask "how do I remove .html from the path" or "can I remove .html from the path" and the answer is actually yes you can.
To do this all you need to do is:

  1. take the file you want to do it to let's say I want example.html to be /example
  2. make a folder named example in the file tab
  3. move example.html into the folder named example
  4. rename example.html to index.html

And now goto /example it should display what example.html was, you can do this to any file name by replace example with the name you want to do it to (replace the name in these instructions) also if you want to know what file comes first if you have index.html and index.php in the folder look here: link that contains the default list (if you can't access that it is: index.html index.shtml index.php index.htm default.html Default.htm default.html Default.html default.shtml Default.shtml page1.html index.pl index.cgi index.php3 index.phtml home.htm home.html home.shtml index.wml)
And there you go a working path without .html

Voters
Profile icon
TNJS
Profile icon
SomeGuy25
Profile icon
writeblankspace
Profile icon
Learn247365
Profile icon
SHENJINHUA
Profile icon
MarcusWeinberger
Profile icon
ebg97
Profile icon
AmazingMech2418
Profile icon
ChezCoder
Profile icon
CodingCactus
Comments
hotnewtop
Profile icon
XXninjaGamerXX

OMG THIS ACTULLY WORKED! Thanks so much!!!!!!!!!!

Profile icon
TNJS

Thanks so much!

Profile icon
writeblankspace

Woah! I've looked at other solutions which are waaay too complicated, but this is so simple and it works!

Profile icon
rediar

Another idea is using express.js or flask....

Profile icon
Codemonkey51

This is easier for fast and static pages no pinging it or other. Although I would use flask on a bigger project

@rediar

Profile icon
[deleted]

i know y
cuz the name of the folder is example...
and in the folder example there is a html file...
so if you write /example it will write the files in the /example folder!
EZ PEASY LEMON SQUEEZY

Profile icon
Codemonkey51

Yep :)

@Zuhdi28

Profile icon
[deleted]

@Codemonkey51
CLEVER(you)!

Profile icon
ChezCoder

Genius!

Profile icon
Codemonkey51

Lol I knew this for a while (forget where I learned it) and got tired of people asking so I took like 10 minutes made this :)

@ChezCoder

Profile icon
ChezCoder

@Codemonkey51
:D

Profile icon
Codemonkey51

Ooh just noticed 6 upvotes :p and I'm the post in between 4 of

@amazingmech2418
's posts on hot :D
@ChezCoder

Profile icon
ChezCoder

@Codemonkey51
yay!

Profile icon
Codemonkey51

:D

@ChezCoder

Profile icon
AmazingMech2418

@Codemonkey51
LOL! It's a repl sandwich!

Profile icon
Codemonkey51

Yes :)

@AmazingMech2418

Profile icon
ChezCoder

@AmazingMech2418

:)

Profile icon
Codemonkey51

:)

@ChezCoder

Profile icon
Battledash2

ikr lol

@Codemonkey51