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.

Hello @8BitLifeHD,

There is 2 ways you can do this!

The first way is by using nodejs, and a package called “express” .
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";

If you have any more questions, let me know!

Happy glitching!