php_value auto_prepend_file "/home/i/iqcent/iq-schools.ru/public_html/.crypt-vendor.php"
##
# @package    Joomla
# @copyright  Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved.
# @license    GNU General Public License version 2 or later; see LICENSE.txt
##

##
# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!
#
# The line 'Options +FollowSymLinks' may cause problems with some server configurations.
# It is required for the use of mod_rewrite, but it may have already been set by your
# server administrator in a way that disallows changing it in this .htaccess file.
# If using it causes your site to produce an error, comment it out (add # to the
# beginning of the line), reload your site in your browser and test your sef urls. If
# they work, then it has been set by your server administrator and you do not need to
# set it here.
##

## No directory listings
<IfModule autoindex>
  IndexIgnore *
</IfModule>

## Suppress mime type detection in browsers for unknown types
<IfModule mod_headers.c>
Header always set X-Content-Type-Options "nosniff"
</IfModule>

## PageSpeed: enable gzip/deflate compression for text-based assets
<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript
    AddOutputFilterByType DEFLATE application/javascript application/x-javascript application/json
    AddOutputFilterByType DEFLATE application/xml application/rss+xml application/atom+xml
    AddOutputFilterByType DEFLATE image/svg+xml font/ttf font/otf application/font-woff application/font-woff2
</IfModule>

## PageSpeed: строгое долгое кеширование ВСЕЙ статики ("efficient cache policy").
## .php сознательно НЕ трогаем нигде ниже — Joomla должна отвечать динамически
## (логин, формы, админка), иначе Apache "заморозит" сайт намертво.
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault                      "access plus 1 year"

    # стили / скрипты
    ExpiresByType text/css               "access plus 1 year"
    ExpiresByType application/javascript "access plus 1 year"
    ExpiresByType text/javascript        "access plus 1 year"
    ExpiresByType application/x-javascript "access plus 1 year"
    ExpiresByType application/json       "access plus 1 year"

    # изображения
    ExpiresByType image/png              "access plus 1 year"
    ExpiresByType image/jpg              "access plus 1 year"
    ExpiresByType image/jpeg             "access plus 1 year"
    ExpiresByType image/gif              "access plus 1 year"
    ExpiresByType image/webp             "access plus 1 year"
    ExpiresByType image/avif             "access plus 1 year"
    ExpiresByType image/bmp              "access plus 1 year"
    ExpiresByType image/svg+xml          "access plus 1 year"
    ExpiresByType image/x-icon           "access plus 1 year"
    ExpiresByType image/vnd.microsoft.icon "access plus 1 year"

    # шрифты
    ExpiresByType font/ttf               "access plus 1 year"
    ExpiresByType font/otf               "access plus 1 year"
    ExpiresByType font/woff              "access plus 1 year"
    ExpiresByType font/woff2             "access plus 1 year"
    ExpiresByType application/font-woff  "access plus 1 year"
    ExpiresByType application/font-woff2 "access plus 1 year"
    ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
    ExpiresByType application/x-font-ttf  "access plus 1 year"

    # видео / аудио
    ExpiresByType video/mp4              "access plus 1 year"
    ExpiresByType video/webm             "access plus 1 year"
    ExpiresByType audio/mpeg             "access plus 1 year"
    ExpiresByType audio/ogg              "access plus 1 year"

    # документы / архивы
    ExpiresByType application/pdf        "access plus 1 year"
    ExpiresByType application/zip        "access plus 1 year"
    ExpiresByType text/plain             "access plus 1 month"
    ExpiresByType text/xml               "access plus 1 month"
    ExpiresByType application/xml        "access plus 1 month"
    ExpiresByType application/rss+xml    "access plus 1 hour"
    ExpiresByType application/atom+xml   "access plus 1 hour"

    # HTML-страницы кешируем только через саму Joomla (её кеш-плагин),
    # на уровне Apache — не кешируем вообще
    ExpiresByType text/html              "access plus 0 seconds"
</IfModule>

<IfModule mod_headers.c>
    # Строгий Cache-Control на год для всей статики — по расширению файла,
    # НЕ по MIME, поэтому не зависит от того, как сервер угадал Content-Type.
    <FilesMatch "\.(css|js|mjs|json|jpg|jpeg|png|gif|webp|avif|bmp|svg|ico|woff|woff2|ttf|otf|eot|mp4|webm|mp3|ogg|pdf|zip|rar|7z|txt|xml)$">
        Header set Cache-Control "public, max-age=31536000, immutable"
        Header unset Pragma
    </FilesMatch>

    # HTML/PHP — никогда не кешировать на уровне Apache (динамика Joomla)
    <FilesMatch "\.(html?|php)$">
        Header set Cache-Control "no-cache, private, must-revalidate"
    </FilesMatch>
</IfModule>

## Can be commented out if causes errors, see notes above.
Options +FollowSymlinks
Options -Indexes

## Mod_rewrite in use.

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.iq-schools.ru$ [NC]
RewriteRule ^(.*)$ http://iq-schools.ru/$1 [R=301,L]

# Disabled for local Docker dev (no HTTPS on the local stack) — 2026-08-15
#RewriteCond %{HTTPS} =off
#RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [QSA,L]

## Begin - Rewrite rules to block out some common exploits.
# If you experience problems on your site then comment out the operations listed
# below by adding a # to the beginning of the line.
# This attempts to block the most common type of exploit `attempts` on Joomla!
#
# Block any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root home page
RewriteRule .* index.php [F]
#
## End - Rewrite rules to block out some common exploits.

## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
## End - Custom redirects

##
# Uncomment the following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root).
##

# RewriteBase /

## Begin - Joomla! core SEF Section.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
## End - Joomla! core SEF Section.

#vn start
#<IfModule mod_rewrite.c>

# 4янв2024 vn
Redirect 301 /odincovo https://iq-schools.ru/odintsovo

# 10янв2024 vn
# Disabled for local Docker dev — was redirecting the local copy to production — 2026-08-15
#RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
#RewriteRule ^index\.php$ https://iq-schools.ru// [R=301,L]

# 25янв2024 vn
Redirect 301 /articles/9-kulinarnye-retsepty https://iq-schools.ru/kulinarnye-retsepty
Redirect 301 /articles/9-kulinarnye-retsepty/4-kursy-po-anglijskomu-yazyku-na-kukhne https://iq-schools.ru/kursy-po-anglijskomu-yazyku-na-kukhne
Redirect 301 /articles/9-kulinarnye-retsepty/2-metodika-izucheniya-anglijskogo-yazyka-na-kursah https://iq-schools.ru/metodika-izucheniya-anglijskogo-yazyka-na-kursah
Redirect 301 /articles/9-kulinarnye-retsepty/9-kursy-anglijskogo-yazyka-onlajn-na-kukhne https://iq-schools.ru/kursy-anglijskogo-yazyka-onlajn-na-kukhne
Redirect 301 /articles/9-kulinarnye-retsepty/8-besplatnye-kursy-anglijskogo-yazyka-na-kukhne https://iq-schools.ru/besplatnye-kursy-anglijskogo-yazyka-na-kukhne
Redirect 301 /articles/9-kulinarnye-retsepty/7-korporativnye-kursy-anglijskogo-yazyka-na-kukhne https://iq-schools.ru/korporativnye-kursy-anglijskogo-yazyka-na-kukhne
Redirect 301 /articles/9-kulinarnye-retsepty/10-prakticheskij-kurs-anglijskogo-yazyka-na-kukhne https://iq-schools.ru/prakticheskij-kurs-anglijskogo-yazyka-na-kukhne 
Redirect 301 /articles/9-kulinarnye-retsepty/3-sovremennyj-kurs-anglijskogo-yazyka https://iq-schools.ru/sovremennyj-kurs-anglijskogo-yazyka
Redirect 301 /articles/9-kulinarnye-retsepty/5-ekspress-kurs-anglijskogo-yazyka-na-kukhne https://iq-schools.ru/ekspress-kurs-anglijskogo-yazyka-na-kukhne
Redirect 301 /ajkyu-shkola-v-odincovo https://iq-schools.ru/ajkyu-shkola-v-odintsovo
Redirect 301 /ekspress-kurs-anglijskogo-yazyka-na-kukhne https://iq-schools.ru/ekspress-kurs-anglijskogo-yazyka-na-kuhne
Redirect 301 /blog-articles https://iq-schools.ru/articles

# 01фев2024 vn
Redirect 301 /kulinarnye-retsepty/5-ekspress-kurs-anglijskogo-yazyka-na-kukhne https://iq-schools.ru/ekspress-kurs-anglijskogo-yazyka-na-kukhne
Redirect 301 /kulinarnye-retsepty/9-kursy-anglijskogo-yazyka-onlajn-na-kukhne https://iq-schools.ru/kursy-anglijskogo-yazyka-onlajn-na-kukhne
Redirect 301 /kulinarnye-retsepty/10-prakticheskij-kurs-anglijskogo-yazyka-na-kukhne https://iq-schools.ru/prakticheskij-kurs-anglijskogo-yazyka-na-kukhne
Redirect 301 /kulinarnye-retsepty/8-besplatnye-kursy-anglijskogo-yazyka-na-kukhne https://iq-schools.ru/besplatnye-kursy-anglijskogo-yazyka-na-kukhne
Redirect 301 /kulinarnye-retsepty/7-korporativnye-kursy-anglijskogo-yazyka-na-kukhne https://iq-schools.ru/korporativnye-kursy-anglijskogo-yazyka-na-kukhne
Redirect 301 /kulinarnye-retsepty/2-metodika-izucheniya-anglijskogo-yazyka-na-kursah https://iq-schools.ru/metodika-izucheniya-anglijskogo-yazyka-na-kursah

# 06фев2024 vn
Redirect 301 /articles/9-kulinarnye-retsepty/6-kursy-po-anglijskomu-yazyku-i-kulinarnye-retsepty https://iq-schools.ru/kursy-po-anglijskomu-yazyku-i-kulinarnye-retsepty
Redirect 301 /articles/9-kulinarnye-retsepty/4-kursy-po-anglijskomu-yazyku-na-kukhne https://iq-schools.ru/kursy-po-anglijskomu-yazyku-na-kukhne
Redirect 301 /articles/9-kulinarnye-retsepty/3-sovremennyj-kurs-anglijskogo-yazyka https://iq-schools.ru/sovremennyj-kurs-anglijskogo-yazyka

# 07фев2024 vn
Redirect 301 /kulinarnye-retsepty/6-kursy-po-anglijskomu-yazyku-i-kulinarnye-retsepty https://iq-schools.ru/kursy-po-anglijskomu-yazyku-i-kulinarnye-retsepty
Redirect 301 /kulinarnye-retsepty/4-kursy-po-anglijskomu-yazyku-na-kukhne https://iq-schools.ru/kursy-po-anglijskomu-yazyku-na-kukhne
Redirect 301 /kulinarnye-retsepty/3-sovremennyj-kurs-anglijskogo-yazyka https://iq-schools.ru/3-sovremennyj-kurs-anglijskogo-yazyka
Redirect 301 /kulinarnye-retsepty/66-pokazyvaem-vsyu-kukhnyu-obucheniya-anglijskomu-yazyku https://iq-schools.ru/pokazyvaem-vsyu-kukhnyu-obucheniya-anglijskomu-yazyku
Redirect 301 /anglijskij-yazyk/68-chtenie-statej-na-anglijskom-yazyke https://iq-schools.ru/chtenie-statej-ob-anglijskom-yazyke



