Diff -- /var/www/vhosts/3dshawn.com/crm.3dshawn.com/.htaccess

O Operator
Diff

/var/www/vhosts/3dshawn.com/crm.3dshawn.com/.htaccess

added on local at 2026-07-01 15:02:13

Added
+40
lines
Removed
-0
lines
Context
0
unchanged
Blobs
from
to 89db80f418df
Restore this content →
Unified diff
Naive LCS-based line diff. Additions in emerald, deletions in rose. Both sides decompressed live from BLOB_STORE.
1# =====================================================================
2# ContactForge -- webroot .htaccess
3# Lives at /var/www/vhosts/3dshawn.com/crm.3dshawn.com/.htaccess
4# =====================================================================
5
6Options +ExecCGI -Indexes +FollowSymLinks
7AddHandler cgi-script .cgi
8DirectoryIndex index.cgi index.html
9
10# Block sensitive files everywhere under the webroot.
11<FilesMatch "\.(sql|pm|log|bak|prev|dat|db|sh|pl)$">
12 Require all denied
13</FilesMatch>
14
15# Long-cache static assets. Bust with ?v=YYYYMMDD on the link tag.
16<FilesMatch "\.(css|js|woff2?|ttf|eot|webp|png|jpg|jpeg|gif|svg|ico)$">
17 <IfModule mod_headers.c>
18 Header set Cache-Control "public, max-age=31536000, immutable"
19 </IfModule>
20</FilesMatch>
21
22# Light security headers.
23<IfModule mod_headers.c>
24 Header always set X-Content-Type-Options "nosniff"
25 Header always set X-Frame-Options "SAMEORIGIN"
26 Header always set Referrer-Policy "strict-origin-when-cross-origin"
27</IfModule>
28
29# Force HTTPS (subdomain has Let's Encrypt cert).
30<IfModule mod_rewrite.c>
31 RewriteEngine On
32 RewriteCond %{HTTPS} !=on
33 RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [L,R=301]
34</IfModule>
35
36# ----- ContactForge API rewrite -----
37<IfModule mod_rewrite.c>
38RewriteEngine On
39RewriteRule ^api/(.+)$ /api.cgi/$1 [L,QSA]
40</IfModule>