AddDefaultCharset UTF-8
# Rewrite http -> https
RewriteCond %{HTTPS} off
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Rewrite [url]www.example.com[/url] -> example.com
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [R=301,L]
# переадресация с index.php на /:
RewriteRule ^index\.php$ https://%{HTTP_HOST}/ [R=301,L]
# Rewrite /?page=index -> /index
RewriteCond %{QUERY_STRING} ^page=(.*)$ [NC]
RewriteRule ^(.*?)\/?$ "$1/%1?" [R=301,L]
# ЧПУ
RewriteRule ^(.+)\/?$ index.php?page=$1 [QSA,L]
# сжатие text, html, javascript, css, xml:
<ifModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/css text/javascript application/javascript application/x-javascript
</ifModule>
# 404
ErrorDocument 404 [url]https://ensy.com.ua/block/404.php[/url]