How does the server know that the index is the main page?

Asked

Viewed 154 times

3

For example, I have several . HTML and . PHP files in the public_html folder on my server (Internal), but when opening the path in the browser (open the path http://localhost/Lucascarvalho/public_html), it always opens index.html, instead of opening the tabs (tabs, I mean, list all the files/folders we have inside public_html) so we choose which page we want to open.

Why is that? It’s standard?

2 answers

6


It’s usually standard Apache, but you can change it in the file .htaccess

<Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
</Directory>

0

Yes, it is standard. Depending on your web server, you can set which document is the default in the settings, or in Asp.net for example, set this by the web.config file as well

Browser other questions tagged

You are not signed in. Login or sign up in order to post.