Стандартный .htaccess
Материал из Umicms
Актуально для версии 21.
<IfModule mod_negotiation.c>
Options All -Indexes
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?path=$1&%{QUERY_STRING}&umi_authorization=%{HTTP:Authorization} [L]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(developerTools|errors|libs|smt|cache|xmldb|static|packages)\/.*$ / [L,R] #legacy directories
</IfModule>
<IfModule mod_php7.c>
php_flag engine off
</IfModule>
<IfModule mod_php5.c>
php_flag engine off
</IfModule>
<IfModule mod_access_compat.c>
<FilesMatch "(?i)\.(php[2-5]?|cgi|pl|fcgi|fpl|phtm|phtml|shtml|asp|jsp|twig|tpl|xslt?|git|svn|htaccess|htaccess_old|htpasswd|gitignore|gitkeep|ini|log|conf|md|sql|lock|umi\.json)$">
Deny from all
</FilesMatch>
<FilesMatch "^(?i)(index|install|umi_smt|installer|dummy|smu/installer|autothumbs|captcha|counter|cron|go-out|license_restore|save_domain_keycode|session|static_banner|updater)\.php$">
Allow from all
</FilesMatch>
<FilesMatch "^(?i)(index|install|umi_smt|installer|dummy|smu/installer)\.php$">
<IfModule mod_php7.c>
php_flag engine on
</IfModule>
<IfModule mod_php5.c>
php_flag engine on
</IfModule>
</FilesMatch>
</IfModule>
<IfModule mod_authz_core.c>
<IfModule !mod_access_compat.c>
<FilesMatch "(?i)\.(php[2-5]?|cgi|pl|fcgi|fpl|phtm|phtml|shtml|asp|jsp|twig|tpl|xslt?|git|svn|htaccess|htaccess_old|htpasswd|gitignore|gitkeep|ini|log|conf|md|sql|lock|umi\.json)$">
Deny from all
</FilesMatch>
<FilesMatch "^(?i)(index|install|umi_smt|installer|dummy|smu/installer|autothumbs|captcha|counter|cron|go-out|license_restore|save_domain_keycode|session|static_banner|updater)\.php$">
Allow from all
</FilesMatch>
<FilesMatch "^(?i)(index|install|umi_smt|installer|dummy|smu/installer)\.php$">
<IfModule mod_php7.c>
php_flag engine on
</IfModule>
<IfModule mod_php5.c>
php_flag engine on
</IfModule>
</FilesMatch>
</IfModule>
</IfModule>
<IfModule !mod_authz_core.c>
<IfModule !mod_access_compat.c>
<FilesMatch "(?i)\.(php[2-5]?|cgi|pl|fcgi|fpl|phtm|phtml|shtml|asp|jsp|twig|tpl|xslt?|git|svn|htaccess|htaccess_old|htpasswd|gitignore|gitkeep|ini|log|conf|md|sql|lock|umi\.json)$">
Deny from all
</FilesMatch>
<FilesMatch "^(?i)(index|install|umi_smt|installer|dummy|smu/installer|autothumbs|captcha|counter|cron|go-out|license_restore|save_domain_keycode|session|static_banner|updater)\.php$">
Allow from all
</FilesMatch>
<FilesMatch "^(?i)(index|install|umi_smt|installer|dummy|smu/installer)\.php$">
<IfModule mod_php7.c>
php_flag engine on
</IfModule>
<IfModule mod_php5.c>
php_flag engine on
</IfModule>
</FilesMatch>
</IfModule>
</IfModule>