<IfModule mod_autoindex>
	Options -Indexes
</IfModule>




# Google PageSpeed Insights модуль PageSpeed,есть не на всех хостингах и не везде может работать, нужно уточнять у хостеров
<IfModule pagespeed_module>
	ModPagespeed on
	ModPagespeedRewriteLevel CoreFilters
	ModPagespeedEnableFilters make_google_analytics_async
	ModPagespeedEnableFilters prioritize_critical_css
	ModPagespeedEnableFilters defer_javascript
	ModPagespeedEnableFilters sprite_images
	ModPagespeedEnableFilters convert_png_to_jpeg,convert_jpeg_to_webp
	ModPagespeedEnableFilters collapse_whitespace,remove_comments
</IfModule>

DirectoryIndex /public/section.php?sectionId=1&rewrite=1531c81c39933d1d807ecbf1c1bbfd01
RewriteEngine On


SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1


RewriteCond %{HTTPS} =off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [QSA,L]
ErrorDocument 404 /public/error-404.php?rewrite=1531c81c39933d1d807ecbf1c1bbfd01


RewriteRule ^rss.xml$ /public/rss.php?rewrite=1531c81c39933d1d807ecbf1c1bbfd01 [L]
RewriteRule ^sitemap.xml$ /public/sitemap.php?rewrite=1531c81c39933d1d807ecbf1c1bbfd01 [L]

RewriteRule ^index\.htm$ https://it-academy.loc/ [L,R=301]


#RewriteRule ^brands/([^/]+)/page([0-9]+)\.htm$ /public/brand.php?%{QUERY_STRING}&fileName=$1&page=$2&rewrite=1531c81c39933d1d807ecbf1c1bbfd01 [L]
RewriteRule ^brands/([^/]+)/([^/]+)/page([0-9]+)\.htm$ /public/brand.php?%{QUERY_STRING}&fileName=$1&page=$2&rewrite=1531c81c39933d1d807ecbf1c1bbfd01 [L]
RewriteRule ^brands/([^/]+)/([^/]+) /public/brand.php?%{QUERY_STRING}&fileName=$1&param=$2&rewrite=1531c81c39933d1d807ecbf1c1bbfd01 [L]
RewriteRule ^brands/([^/]+) /public/brand.php?%{QUERY_STRING}&fileName=$1&rewrite=1531c81c39933d1d807ecbf1c1bbfd01 [L]


RewriteRule ^about$ /about/ [L,R=301]
RewriteRule ^about/$ /public/section.php?%{QUERY_STRING}&sectionId=2&rewrite=1531c81c39933d1d807ecbf1c1bbfd01 [L]
RewriteRule ^about/page([0-9]+)\.htm$ /public/section.php?%{QUERY_STRING}&sectionId=2&page=$1&rewrite=1531c81c39933d1d807ecbf1c1bbfd01 [L]
RewriteRule ^about/([^/]+)\.htm$ /public/article.php?%{QUERY_STRING}&fileName=$1&sectionId=2&rewrite=1531c81c39933d1d807ecbf1c1bbfd01 [L]


RewriteRule ^courses$ /courses/ [L,R=301]
RewriteRule ^courses/$ /public/section.php?%{QUERY_STRING}&sectionId=3&rewrite=1531c81c39933d1d807ecbf1c1bbfd01 [L]
RewriteRule ^courses/page([0-9]+)\.htm$ /public/section.php?%{QUERY_STRING}&sectionId=3&page=$1&rewrite=1531c81c39933d1d807ecbf1c1bbfd01 [L]
RewriteRule ^courses/([^/]+)\.htm$ /public/article.php?%{QUERY_STRING}&fileName=$1&sectionId=3&rewrite=1531c81c39933d1d807ecbf1c1bbfd01 [L]


RewriteRule ^our\-mentors$ /our-mentors/ [L,R=301]
RewriteRule ^our\-mentors/$ /public/section.php?%{QUERY_STRING}&sectionId=4&rewrite=1531c81c39933d1d807ecbf1c1bbfd01 [L]
RewriteRule ^our\-mentors/page([0-9]+)\.htm$ /public/section.php?%{QUERY_STRING}&sectionId=4&page=$1&rewrite=1531c81c39933d1d807ecbf1c1bbfd01 [L]
RewriteRule ^our\-mentors/([^/]+)\.htm$ /public/article.php?%{QUERY_STRING}&fileName=$1&sectionId=4&rewrite=1531c81c39933d1d807ecbf1c1bbfd01 [L]


RewriteRule ^news$ /news/ [L,R=301]
RewriteRule ^news/$ /public/section.php?%{QUERY_STRING}&sectionId=5&rewrite=1531c81c39933d1d807ecbf1c1bbfd01 [L]
RewriteRule ^news/page([0-9]+)\.htm$ /public/section.php?%{QUERY_STRING}&sectionId=5&page=$1&rewrite=1531c81c39933d1d807ecbf1c1bbfd01 [L]
RewriteRule ^news/([^/]+)\.htm$ /public/article.php?%{QUERY_STRING}&fileName=$1&sectionId=5&rewrite=1531c81c39933d1d807ecbf1c1bbfd01 [L]


RewriteRule ^contacts$ /contacts/ [L,R=301]
RewriteRule ^contacts/$ /public/section.php?%{QUERY_STRING}&sectionId=6&rewrite=1531c81c39933d1d807ecbf1c1bbfd01 [L]
RewriteRule ^contacts/page([0-9]+)\.htm$ /public/section.php?%{QUERY_STRING}&sectionId=6&page=$1&rewrite=1531c81c39933d1d807ecbf1c1bbfd01 [L]
RewriteRule ^contacts/([^/]+)\.htm$ /public/article.php?%{QUERY_STRING}&fileName=$1&sectionId=6&rewrite=1531c81c39933d1d807ecbf1c1bbfd01 [L]


RewriteRule ^oznakomlen$ /oznakomlen/ [L,R=301]
RewriteRule ^oznakomlen/$ /public/section.php?%{QUERY_STRING}&sectionId=7&rewrite=1531c81c39933d1d807ecbf1c1bbfd01 [L]
RewriteRule ^oznakomlen/page([0-9]+)\.htm$ /public/section.php?%{QUERY_STRING}&sectionId=7&page=$1&rewrite=1531c81c39933d1d807ecbf1c1bbfd01 [L]
RewriteRule ^oznakomlen/([^/]+)\.htm$ /public/article.php?%{QUERY_STRING}&fileName=$1&sectionId=7&rewrite=1531c81c39933d1d807ecbf1c1bbfd01 [L]


# все запросы в префиксом (ajax) будут обрабатываться следующим образом ajax-(что здесь будет) /public/ajax-feedback СЮДА ПРИДЕТ.php
RewriteRule ^ajax-(.*) /public/ajax-$1.php?rewrite=1531c81c39933d1d807ecbf1c1bbfd01 [QSA]
# все запросы в префиксом (api) будут обрабатываться следующим образом api-(что здесь будет) /public/api-app СЮДА ПРИДЕТ.php
RewriteRule ^api-(.*) /public/api-$1.php?rewrite=1531c81c39933d1d807ecbf1c1bbfd01 [QSA]

# Set the “ea-php74” package as the default “PHP” programming language.
#<IfModule mime_module>
#	AddHandler application/x-httpd-ea-php74 .php .php7 .phtml
#</IfModule>

