Good day! Created a site, uploaded to Hostinger.ru.

I went to the hosting, completely cleared the root folder, and then uploaded my website. At the root is index.php, but the site does not start it and when loading my site it writes:

Index of /

There is a .htaccess file in the root of the site in which it indicated:

AddDefaultCharset utf-8 AddType application/x-httpd-php .php .html .css RewriteCond %{HTTP_HOST} ^www\.(.*) [NC] RewriteRule ^/?(.*) http://%1/$1 [L,R=permanent] DirectoryIndex index.php 

But the problem remains. How to fix it to open index.php

  • Corrected the mistake. If anyone is interested: the whole site should be placed in the public_html folder, and not in the root of the hosting. - Alex69rus

1 answer 1

If there is no index.php in the displayed list (in the sense, "Index of /" is all you see), it means that you have not uploaded your index.php to the wrong place.

  • one
    Thanks, all worked well. Immediately did not realize where to fill the whole site - Alex69rus