L
L
Let_peace2020-08-03 23:35:01
htaccess
Let_peace, 2020-08-03 23:35:01

.htaccess not working on hosting from reg.ru, how to fix it?

In the root folder on the site (hosting on reg.ru) there is the following .htaccess file:

RewriteEngine On
AddDefaultCharset UTF-8
DirectoryIndex index.php main.php venki.html
RewriteBase /
RewriteRule (.*)\.html$ $1 [R=301]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ /index.php?route=$1 [QSA,L]

But nothing works, please tell me what needs to be fixed here?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2020-08-04
@Let_peace

1. You may have nginx+PHP-FPM and .htaccess won't work at all. Move the rules to nginx.
2. You do not have mod_rewrite enabled, go to the panel and turn it on, if not in the panel, you can try this

a2enmod rewrite
service apache2 restart

3. Another option is that you do not have support for .htacces itself in Apache, this can most likely be done either through the panel or from the console , again depending on the OS of the tariff, etc.
4. The file has rights that do not allow Apache to read it, rights or owner .
What to ventilate what to do.
1. you deliberately enter an error in the file the site should stop working. If not, they don't really read it.
2. support, because by default the rewrite mod is enabled for everyone and .htaccess is processed by default.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question