Skip to content

Commit 3036e37

Browse files
Arpith Siromoneyclaude
andcommitted
Fix static asset routing with correct splat syntax
Use :splat placeholder for file extension matching per Cloudflare docs: "A splat (asterisk, *) will greedily match all characters" Pattern: /*.css /:splat.css 200 This matches /style.css and rewrites to /style.css Reference: https://developers.cloudflare.com/pages/configuration/redirects/ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent b9326ab commit 3036e37

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

static/_redirects

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
/api https://api.feedreader.co 301
33
/bookmarklet/js /bookmarklet.js 301
44

5-
# Static assets - pass through (prevent catch-all from matching)
5+
# Static assets - pass through using splat syntax (prevent catch-all from matching)
66
# Reference: https://developers.cloudflare.com/pages/configuration/redirects/
7-
# "Redirects are always followed, regardless of whether or not an asset matches"
8-
/*.css /*.css 200
9-
/*.js /*.js 200
10-
/*.png /*.png 200
11-
/*.ico /*.ico 200
12-
/*.icns /*.icns 200
13-
/*.json /*.json 200
14-
/*.xml /*.xml 200
15-
/*.txt /*.txt 200
7+
# Splat pattern: "A splat (asterisk, *) will greedily match all characters"
8+
/*.css /:splat.css 200
9+
/*.js /:splat.js 200
10+
/*.png /:splat.png 200
11+
/*.ico /:splat.ico 200
12+
/*.icns /:splat.icns 200
13+
/*.json /:splat.json 200
14+
/*.xml /:splat.xml 200
15+
/*.txt /:splat.txt 200
1616

1717
# Folder redirects - preserve existing links
1818
/login /login/ 301

0 commit comments

Comments
 (0)