There is a rule in .htaccess to hide all txt files

RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^.*\.txt$ /index.php 

On LAN, everything works - as I upload to the server, nothing works as if there is no such rule, and all txt files can be viewed.

The rest of the rules (and there are many), for example

 RewriteRule ^module/([0-9A-Za-z]+)(/?)+$ /index.php?module=$1 [L,QSA] 

What could be the reason?

At the beginning of the file I have this

 php_value display_errors 1 php_value error_reporting 2047 RewriteEngine On Options +FollowSymLinks Options -Indexes 
  • In .htaccess added directive RewriteEngine on? - cheops
  • @cheops yes, updated the question. - RussCoder

1 answer 1

Actually, everything was pretty simple. That's what I was answered in those hosting support.

Static files, for example TXT, are not given by Apache, but by Nginx, which ignores settings from .htaccess. If this problem is critical for you, we can redirect all requests for Apache, your rules in .htaccess will work, but this may adversely affect the performance of the site.