skip to Main Content

There is an index.html which opens default page of a website/webpage, say, www.domain.com

In the root, there is a folder, say, UdG, which has a html file, say, UdG.html, containing only text.

Need that www.domain.com/UdG opens the UdG.html.

What code lines to write in UdG.html and index.html?

Tried link ref= and a href= but www.domain.com/UdG does not open UdG.html.

2

Answers


  1. Chosen as BEST ANSWER

    Of course, it's better to just name the second file index.html also, and then it's automatic


  2. If the folder is part of the URL, like www.domain.com/UdG/ and no file is indicated in the URL, the server will look for an index.php or index.html file inside that folder (in this order) and load it. That’s true for any folder.

    If there is no folder in the URL, the server will look for index.php and index.html on the root level and open that one.

    So whatever you want to be opened automatically, rename it to index.html.

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