fix(netlify): redirect /epub and /pdf directly to GitHub Pages URLs

The relative path redirects were being caught by the catch-all redirect
with force=true, causing a redirect chain that led to 404 errors.

Fixes #1070
This commit is contained in:
Vijay Janapa Reddi
2025-12-10 05:47:26 -08:00
parent d1d2b1f4f7
commit 5d5c4c3509

View File

@@ -30,22 +30,22 @@
[[redirects]]
from = "/pdf"
to = "/assets/downloads/Machine-Learning-Systems.pdf"
to = "https://harvard-edge.github.io/cs249r_book/assets/downloads/Machine-Learning-Systems.pdf"
status = 301
[[redirects]]
from = "/pdf/"
to = "/assets/downloads/Machine-Learning-Systems.pdf"
to = "https://harvard-edge.github.io/cs249r_book/assets/downloads/Machine-Learning-Systems.pdf"
status = 301
[[redirects]]
from = "/epub"
to = "/assets/downloads/Machine-Learning-Systems.epub"
to = "https://harvard-edge.github.io/cs249r_book/assets/downloads/Machine-Learning-Systems.epub"
status = 301
[[redirects]]
from = "/epub/"
to = "/assets/downloads/Machine-Learning-Systems.epub"
to = "https://harvard-edge.github.io/cs249r_book/assets/downloads/Machine-Learning-Systems.epub"
status = 301
[[redirects]]