Files
cmsPRO/libraries/.htaccess
2026-02-22 21:59:33 +01:00

31 lines
866 B
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.
# /libraries/.htaccess
Options -Indexes
<IfModule mod_rewrite.c>
RewriteEngine On
# 1) PRZEPUŚĆ cały katalog grid/ do jego własnego .htaccess
# (tu zatrzymujemy przetwarzanie reguł w tym pliku)
RewriteRule ^grid/ - [L]
RewriteRule ^filemanager-9.14.1/ - [L]
# 2) POZWÓL na pliki statyczne w całym /libraries
RewriteRule ^.*\.(css|js|map|mjs|png|jpe?g|gif|svgz?|webp|ico|woff2?|woff|ttf|eot)$ - [L,NC]
# 3) ZABLOKUJ wszystkie pliki wykonywalne w /libraries (poza grid/, bo już wyszliśmy [L])
RewriteRule ^.*\.(php|phtml|phar|pht|cgi|pl|py|sh)$ - [F,NC]
# 4) WSZYSTKO inne → 403
RewriteRule ^ - [F]
</IfModule>
# Ukryte pliki (.env itp.) nie serwuj
<FilesMatch "^\.(.*)$">
Require all denied
</FilesMatch>
# Bezpieczeństwo MIME
<IfModule mod_headers.c>
Header always set X-Content-Type-Options "nosniff"
</IfModule>