Diff -- /var/www/vhosts/3dshawn.com/affiliate.3dshawn.com/.htaccess
Diff
/var/www/vhosts/3dshawn.com/affiliate.3dshawn.com/.htaccess
added on local at 2026-07-01 13:46:54
Added
+44
lines
Removed
-0
lines
Context
0
unchanged
Blobs
from
to e1b0c670c766
to e1b0c670c766
Unified diff
Naive LCS-based line diff. Additions in emerald, deletions in rose. Both sides decompressed live from BLOB_STORE.| 1 | # ===================================================================== | |
| 2 | # AffSoft — webroot .htaccess | |
| 3 | # Lives at /var/www/vhosts/3dshawn.com/affiliate.3dshawn.com/.htaccess | |
| 4 | # | |
| 5 | # Only directives that are LEGAL inside .htaccess are used (no <Directory> | |
| 6 | # or <VirtualHost> blocks — those are reserved for the main server config). | |
| 7 | # ===================================================================== | |
| 8 | ||
| 9 | # ----- CGI execution ---------------------------------------------------- | |
| 10 | # Treat *.cgi files as CGI scripts. Plus a sane index file order. | |
| 11 | Options +ExecCGI -Indexes +FollowSymLinks | |
| 12 | AddHandler cgi-script .cgi | |
| 13 | DirectoryIndex index.cgi index.html | |
| 14 | ||
| 15 | # ----- Block sensitive files everywhere under the webroot --------------- | |
| 16 | # *.sql — db_schema.sql and any SQL dumps | |
| 17 | # *.pm — Perl modules accidentally placed in the webroot | |
| 18 | # *.log — error / debug logs | |
| 19 | # *.bak — editor backup files | |
| 20 | # *.prev — pre-edit copies | |
| 21 | <FilesMatch "\.(sql|pm|log|bak|prev|dat|db)$"> | |
| 22 | Require all denied | |
| 23 | </FilesMatch> | |
| 24 | ||
| 25 | # ----- Force HTTPS ------------------------------------------------------ | |
| 26 | <IfModule mod_rewrite.c> | |
| 27 | RewriteEngine On | |
| 28 | RewriteCond %{HTTPS} !=on | |
| 29 | RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [L,R=301] | |
| 30 | </IfModule> | |
| 31 | ||
| 32 | # ----- Long-cache static assets ----------------------------------------- | |
| 33 | <FilesMatch "\.(css|js|woff2?|ttf|eot|webp|png|jpg|jpeg|gif|svg|ico)$"> | |
| 34 | <IfModule mod_headers.c> | |
| 35 | Header set Cache-Control "public, max-age=31536000, immutable" | |
| 36 | </IfModule> | |
| 37 | </FilesMatch> | |
| 38 | ||
| 39 | # ----- Light security headers ------------------------------------------ | |
| 40 | <IfModule mod_headers.c> | |
| 41 | Header always set X-Content-Type-Options "nosniff" | |
| 42 | Header always set X-Frame-Options "SAMEORIGIN" | |
| 43 | Header always set Referrer-Policy "strict-origin-when-cross-origin" | |
| 44 | </IfModule> |