K
K
Keit2652020-07-13 21:52:40
htaccess
Keit265, 2020-07-13 21:52:40

What does it mean and how to remove Index of /?

I made a site on a test hosting handyhost and at the end of the development transferred it to the client on a hosting, not rented, but personal. Transferred all files related to wordpress. It turned out like this:
xkE1JYofoXY.jpg
Multisite was installed on WordPress (2 sites in 1 wordpress main panel) and there it was necessary to put the following htaccess file:
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# add a trailing slash to /wp -admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a- zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]

There are no problems with custom hosting, everything is already pre-installed there, and you just need to fill in all the folders in www and *website name*
And maybe there is another problem that the database is not there yet? For some reason it doesn't import. Constantly loads for a long time and writes the site could not send data or something like that.
Now the site looks like this:
IR1bjEYp9cc.jpg

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Ermilov, 2020-07-13
@sergeiermilov

Hosting is configured incorrectly or something is incorrectly specified in htaccess.
You can add htaccess to the end:
Options -Indexes
And just in case, in order for the directories not to open, you need to add an empty index.php, which is in many folders of Wordpress itself with the following content:

<?php
// Silence is golden
?>

L
Lord_Dantes, 2020-07-17
@Lord_Dantes

Having initially discarded all the problems with Wordpress, we can notice that the hosting itself does not read the PHP file.
I would start with this.
Further on the note, I would throw in the fact that the VP files are usually transferred by the archive, and not by ftp, all files, because this way you can lose a few of them, you won’t even notice.
The database, of course, the site will not work without the database, as you say, it cannot load for a long time. You either imported it or you didn't.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question