DirectoryIndex index.php

ErrorDocument 404 "Looks like mod_rewrite does not work. Please set url_composition to 'real' in user/config.php and try again."

Options -Indexes

<IfModule mod_rewrite.c>
RewriteEngine On

# Multiuser mode when users are organized by host:
RewriteCond %{DOCUMENT_ROOT}/users/%{HTTP_HOST}/files%{REQUEST_URI} -f
RewriteRule .* users/%{HTTP_HOST}/files/$0 [L]

# For times when userpics were in user/ folder:
# RewriteRule user/(.*) users/%{HTTP_HOST}/$1 [L]

# Fix mod_rewrite's trailing slash bug:
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule (.+)[^/]$ $1/ [R=301,L]

RewriteCond %{REQUEST_URI} \.htaccess$
RewriteRule .* - [F]

RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ - [L]

RewriteRule ^index\.php$ - [L]
RewriteRule .* index.php?go=$0 [QSA,L,B]
</IfModule>

<IfModule mod_security.c>
SecFilterEngine Off
</IfModule>

<IfModule mod_charset.c>
CharsetRecodeMultipartForms Off
CharsetSourceEnc windows-1251
</IfModule>

<IfModule mod_authz_core.c>
  <FilesMatch ^.*\.(psa|json|sql|htaccess)$>
    Require all denied
  </FilesMatch>
</IfModule>

<IfModule !mod_authz_core.c>
  <FilesMatch ^.*\.(psa|json|sql|htaccess)$>
    Deny from all
  </FilesMatch>
</IfModule>

<IfModule mod_php5.c>
php_flag display_errors on
php_flag register_globals off
php_flag magic_quotes_gpc off
php_flag magic_quotes_runtime off
php_flag zlib.output_compression on
php_flag mbstring.func_overload off
php_value output_buffering 0
php_value error_reporting 7 
php_value session.use_trans_sid 0
php_value date.timezone GMT
php_value upload_max_filesize 256M
php_value post_max_size 256M
</IfModule>

<IfModule mod_php7.c>
php_flag display_errors on
php_flag magic_quotes_gpc off
php_flag magic_quotes_runtime off
php_flag zlib.output_compression on
php_flag mbstring.func_overload off
php_value output_buffering 0
php_value error_reporting 7 
php_value session.use_trans_sid 0
php_value date.timezone GMT
php_value upload_max_filesize 256M
php_value post_max_size 256M
</IfModule>

<IfModule mod_php8.c>
php_flag display_errors on
php_flag magic_quotes_gpc off
php_flag magic_quotes_runtime off
php_flag zlib.output_compression on
php_flag mbstring.func_overload off
php_value output_buffering 0
php_value error_reporting 7 
php_value session.use_trans_sid 0
php_value date.timezone GMT
php_value upload_max_filesize 256M
php_value post_max_size 256M
</IfModule>
