Remove Extensions from Sub-Pages


Hey so, I’m wondering on how I could remove the extensions from my sub pages thanks. Works Doesn’t Work


This depends a lot on what frameworks you’re using, but if you’re using Node with Express, like the “node-app” starter project, you’ll need to add a route to your server file.

For instance if you look at line 15 in!/hello-express?path=server.js:15:0 , the part that says app.get(“/“...) defines a route for the home page of that app. If you changed “/“ to “index” then what you see at would instead show up at without any “.html”

This project can show you that.

1 Like

Hey @Ipex I see you’re starting with a hello-webpage-based project. That pattern uses lws for the web server, which can be controlled by a file called lws.config.js at the root of your project (i.e. not in a subfolder). The documentation at might be helpful - you could probably accomplish what you’re looking to do by using redirects as described there.

I also see you attempted to use a .htaccess file to remove the extensions. That won’t work with an lws-based project because lws doesn’t respect .htaccess, but you could start from something like, which starts an Apache web server that will pay attention to .htaccess.

Hope this helps!

1 Like

I’m really confused on what to do @cori.


Ok, assuming that your central goal is to be able to build a site with static web pages (just plain html files) without extensions, and that you’re pretty comfortable with .htaccess, I’ve remixed and added your .htaccess and pages/1.html file to show how to do with with Apache. You can take a look at and the results at

The “magic” starts in glitch.json, which tells Glitch to run the scripts referenced there. Then tells Glitch to start up Apache (the important bits of which are in the .apache2 folder that was copied over from

Hopefully that will help get you on your way, but let me know if you have further questions!

1 Like