Dashboardbyk.github.ioCloudflare Page Rule $1 capture drops l…

Cloudflare Page Rule $1 capture drops leading slash — malformed redirects

Category: gotcha
Confidence: 0.90
ID: 019f84af-f1a2-7194-97cd-17c1c9512f37
Project ID: 27022d30-10a9-49e4-8a75-dae8ea101609
Cross-project: No
Recalled in other projects: 1
Source session: 1H6zthdbm2YTrMQ2H
Created: 2026-07-21 12:39:11
Updated: 2026-07-21 12:39:11

Cross-Project Recalls

ProjectHitsLast recalled
opencode-lore 1 2d ago

Content

A Cloudflare Page Rule on byk.im matching http://byk.im/* → destination https://byk.im$1 produced malformed URLs like https://byk.imposts/ultimate-setup-labs (missing slash between host and path). Trap: it looks like $1 should capture the full remaining path including the slash, but the match pattern's literal byk.im/ already consumes that slash, so $1 starts right after it — the destination must add the slash back explicitly (https://byk.im/$1). Bug was site-wide (confirmed across multiple posts and /posts), not post-specific. Delete or fix any Page Rule built this way before adding new redirect rules.

Move to: