skip to Main Content

see reference image.

I’m trying to run files with proper.html extension but still it’s showing listing directory instead of running the code. I have faced this issue earlier but that was because I was running the css . But now I’m having the same issue when I’m running the html file. Kindly help 🙏

2

Answers


  1. The localhost index is a list of all the paths you have, to access a specific project, you must access it in the following way:

    localhost/your folder name/path
    
    Login or Signup to reply.
  2. You need to provide ‘index.html’ file in exposed directory. It has to be named exactly like this.(‘index.html’)

    More info: https://webmasters.stackexchange.com/questions/30234/the-right-way-of-using-index-html

    Why is VS code live server opening a directory instead of running the code in the browser?

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search