Skip to content

Commit

Permalink
htaccess: Better rules
Browse files Browse the repository at this point in the history
  • Loading branch information
busybox11 committed Nov 11, 2023
1 parent 42013d4 commit f1ce243
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,18 @@ ErrorDocument 404 /404.php
ErrorDocument 403 /403.php

RedirectMatch 403 /.env

# vendor
RewriteRule ^vendor/.*$ - [F,L,NC]

# disable .git folder
RedirectMatch 404 /\.git

# disable .devcontainer, .vscode, .github folders
RedirectMatch 404 /(\.devcontainer|\.vscode|\.github)

# disable directory browsing
Options -Indexes

# disable server signature
ServerSignature Off

0 comments on commit f1ce243

Please sign in to comment.