Индексный файл или файл-индекс — это тот файл, который открывается по умолчанию при обращении пользователя через веб к каталогу, а не к конкретному файлу.

For example, your visitor will ask for an address http://your_domain_name/price/, where price is the name of the catalog.

An index file is the file that will be shown to the user when accessing a directory without specifying the name of a specific file in it.

The default index files are the following: index.html, index.htm, index.php


The index file can be repurposed using the .htaccess file

Create a .htaccess file in the directory (if it doesn’t exist, with a dot at the beginning)
Write it down


DirectoryIndex mainpage.html


and now when accessing this directory, for example your_domain_name/price/ - the file "mainpage.html" will be given first

¿Fue útil la respuesta? 29 Los Usuarios han Encontrado Esto Útil (91 Votos)