-1

On a website, say www.example.com you could have a path to a file page-1 so it would become www.example.com/page-1. But then that page could have an extended path of that path so it could become www.example.com/page-1/sub-page-1

My guess is that the file structure is somewhat like:

Root
    page-1.html
    page-1 >
        sub-page-1.html

Where page-1 is a folder containing sub-page-1.

Is this correct? I tried searching for how this is done but all results in my search weren't relevant.

I've seen websites with multiple layers of path seperators such as it could be www.example.com/careers/accountant/about

Would the path be careers (folder) -> accountant (folder) -> about.html?

What about pages with user-generated content such as a Q&A website (such as stackoverflow) where there may be something like https://stackoverflow.com/questions/4/how-to-convert-a-decimal-to-a-double-in-c Would it be questions (folder) -> 4 (folder) -> how-to-convert-a-decimal-to-a-double-in-c.html?

tukars
  • 58
  • 7
  • Note that on the web, these are "directories" and not the Windows concept of "folders" which is not the same thing. – Rob Jul 31 '21 at 09:26

1 Answers1

0

It honestly depends on the file structure of the website! Usually pages are found in a logical order like you mentioned, from what I've seen so far underneath folders as the path. However this may change when working with things such as REACT only applications where it's carried out through routing of a single-page application instead of following a linear tree-like structure. Not sure if I've explained this great but I hope it helps! :)

Daragca
  • 16
  • 1