How do I automatically open a .html file

A project always finds an index.html file if it is not in a folder.
When i place it in a folder my website says it cannot find a main page.
I want it to find the index.html file that is in the index folder.
thanks!

Hello @8BitLifeHD,

There is 2 ways you can do this!

The first way is by using nodejs, and a package called “express”
https://appdividend.com/2018/02/03/node-js-express-tutorial-beginners-2018/ .
You can follow that tutorial but replace anything that says npm, with pnpm

The second way is too have the first index.html file outside of a folder, and inside that html file have this code:


<script type="text/javascript">
    window.location = "./yourfolder/yourhtmlfile.html";
</script>

If you have any more questions, let me know!

Happy glitching!