first commit
This commit is contained in:
30
libraries/.htaccess
Normal file
30
libraries/.htaccess
Normal file
@@ -0,0 +1,30 @@
|
||||
# /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>
|
||||
Reference in New Issue
Block a user