Files
studiobeve.no/.htaccess
T
UbuntuandClaude Opus 5.5 3440188c0f Close the critical holes found in the security audit
- .htaccess: 404 for dotfiles (.git etc.), logs/dumps/archives,
  composer files, vendor/, documents/, archive/
- Pages::ajax: changeUserStatus, checkUser and refreshLogMonitor now
  require a logged-in admin or module user; the operator is logged from
  the session, not the request
- Public worker JSON only returns worker_id and worker_name (no ntfy
  topic or calendar ID)
- Admin: the five worker-schedule methods now redirect to login
  without a session

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 22:34:15 +00:00

28 lines
1.0 KiB
ApacheConf
Executable File

<IfModule mod_rewrite.c>
RewriteEngine on
# Never serve build/VCS/ops artefacts that live in the webroot (2026-11-18).
# Dotfiles + .git are also blocked server-wide on test (conf block-sensitive).
RewriteRule (^|/)\.(?!well-known(/|$)) - [R=404,L]
RewriteRule \.(md|rst|log|7z|zip|tar|gz|sql|csv|lock|bak|old|orig|swp|env|ini|sh)$ - [R=404,NC,L]
RewriteRule ^(composer\.json|vendor/|documents/|archive/|cgi-bin/) - [R=404,NC,L]
# Job ad renamed: ledigestilling.html -> negletekniker.html (2026-07-17)
RewriteRule ^ledigestilling/ledigestilling\.html$ /ledigestilling/negletekniker.html [R=301,L]
# Barber vacancy hidden (2026-10-06): file kept, direct visits go to the listing. 302 so it can be re-opened.
RewriteRule ^ledigestilling/barber\.html$ /ledigestilling/ [R=302,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
<IfModule mod_php5.c>
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
<IfModule !mod_php5.c>
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
</IfModule>