: Working with different URL structures As I'm quite newbie to this field, I've doubts and there are some I couldn't find on Google, i.e: If I'm not wrong, index.html makes it possible to avoid
As I'm quite newbie to this field, I've doubts and there are some I couldn't find on Google, i.e:
If I'm not wrong, index.html makes it possible to avoid to add the filename to the url, example.com/ is equal to example.com/index.html. And that works for the following subdirectories, right? example.com/music/
Is there any other way to achieve this without using an index.html file? (I've read smth about converting dynamic urls to static: ./?var1=value1&varN=valueN -> ./value1/valueN)
How can I convert example.com/music/ to music.example.com/ and why should it be used?
Thanks in advance!
More posts by @Kevin317
1 Comments
Sorted by latest first Latest Oldest Best
You can define which file acts as the entry page. On an Apache server, you do this with a file named .htaccess which you place in the root directory (or in a specific directory). This file is a normal text file, with following line you define an entry page:
DirectoryIndex hello.html
Now, if anybody calls your directory www.example.com, the page www.example.com/hello.html will actually be shown.
The filename index.html is just a convention. If no entry page is defined, the server tries a few default filenames like index.html, index.php, etc.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.