Options -Indexes
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /
  RewriteCond %{HTTPS} off
  RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  RewriteRule ^sitemap\.xml$ /sitemap.php [L]
  RewriteRule ^(en|ru|uk|ku)/category/([a-z0-9-]+)/?$ /category.php [L,QSA]
  RewriteRule ^(en|ru|uk|ku)/search/?$ /search.php [L,QSA]
  RewriteRule ^(en|ru|uk|ku)/trending/?$ /trending.php [L,QSA]
  RewriteRule ^(en|ru|uk|ku)/([^/]+)/?$ /post.php [L,QSA]
  RewriteRule ^category/([a-z0-9-]+)/?$ /category.php [L,QSA]
  RewriteRule ^search/?$ /search.php [L,QSA]
  RewriteRule ^trending/?$ /trending.php [L,QSA]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !^/(admin|assets|ajax|cache)/
  RewriteCond %{REQUEST_URI} !^/(install|sitemap|robots|404)\.
  RewriteRule ^([^/]+)/?$ /post.php [L,QSA]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^ /404.php [L]
</IfModule>
<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/html text/css application/javascript image/svg+xml
</IfModule>
<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresByType image/jpeg "access plus 1 year"
  ExpiresByType image/png "access plus 1 year"
  ExpiresByType image/webp "access plus 1 year"
  ExpiresByType text/css "access plus 1 month"
  ExpiresByType application/javascript "access plus 1 month"
</IfModule>
<IfModule mod_headers.c>
  Header always set X-Content-Type-Options "nosniff"
  Header always set X-Frame-Options "SAMEORIGIN"
</IfModule>
ErrorDocument 404 /404.php
