Static Sites Redirect /something to something.html internally

Just make static sites redirect from /something to something.html internally so we dont have to have .html at then end of the url.

(“something” is referring to whatever the html file is called)

Yes. Or an option to do so. Not sure it’s possible with the current npm package they use to serve the static sites though.

I think glitch has changed how they handle static sites. If I am correct, they no longer use an NPM package and now use s3.

Or you can make a file called index.html in the folder called something to remove it.

4 Likes

yes, thats what i always do. however, your path will auto-redirect from /something to /something/.

I don’t think there is anything wrong with that.

1 Like

i know, i’m just saying.

the only time where that might be a problem would be maybe if you were saving the location.pathname to a database or something.

Not like that matters as when you redirect them after saving the location it ends up at the same URL.