Hi @georhe6 ,
Solution: Host Static HTML/CSS/JS in AEM DAM + Use Sling Mapping
1. Upload All Static Files to DAM
Example folder:
/content/dam/static-site/
├── page1.html
├── page2.html
├── styles/
│ └── style.css
└── scripts/
└── script.js
Now each HTML page is accessible via: https://<domain>/content/dam/static-site/page1.html
2. Fix Relative Paths in HTML
Update links in your HTML:
<!-- Original -->
<link rel="stylesheet" href="styles/style.css">
<script src="scripts/script.js"></script>
<!-- Updated (DAM paths) -->
<link rel="stylesheet" href="/content/dam/static-site/styles/style.css">
<script src="/content/dam/static-site/scripts/script.js"></script>
3. Sling Resource Mapping (Vanity URLs)
Make /page1.html serve from /content/dam/... by mapping paths.
Path: /apps/<project>/config/rewriter/mapping (create mapping)
Create mapping at /etc/map.publish/http:
/content/site/page1.html -> /content/dam/static-site/page1.html
/content/site/page2.html -> /content/dam/static-site/page2.html
Use a Sling Mapping Node or Apache Rewrite Rule depending on AEMaaCS setup.
4. Dispatcher Config (Optional)
Ensure Dispatcher allows HTML in DAM: In dispatcher.any:
/0001 { /type "allow" /glob "/content/dam/static-site/*.html" }
5. Test URLs
Access:
https://<domain>/content/site/page1.html
Behind the scenes, it serves from DAM → Perfect rendering, no components, no deployment needed.
Regards,
Amit