Files
ave-cms/adminx/.htaccess
T
2026-07-27 12:58:44 +03:00

28 lines
1.5 KiB
ApacheConf
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
###################### ADMINX_HTACCESS_BEGIN ##########################
# Роутинг панели: все несуществующие пути внутри текущего каталога заворачиваем
# на index.php (чистые URL). Реальные файлы (assets, css, js) отдаются
# напрямую. Правила подкаталога перекрывают корневой .htaccess для этого дерева.
Options -Indexes +FollowSymLinks
<IfModule mod_rewrite.c>
RewriteEngine On
# Only the front controller may be executed over HTTP. Module PHP files are
# include-only; their assets remain available through the file rule below.
RewriteRule ^(?!index\.php$).*\.php$ - [R=404,L]
# /<admin-directory>/modules совпадает с физической директорией модулей.
# Сам экран менеджера должен попасть во front controller, а вложенные
# modules/<Name>/assets/* ниже по-прежнему отдаются как реальные файлы.
RewriteRule ^modules/?$ index.php [L,QSA]
# Реальные файлы и директории — напрямую (css/js/картинки/аватары).
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
# Всё остальное — во фронт-контроллер админки.
RewriteRule . index.php [L,QSA]
</IfModule>
####################### ADMINX_HTACCESS_END ###########################