Skip to content

Deploy on Cloudflare

Finn Bear edited this page Jun 27, 2025 · 2 revisions

DNS

homepage

(configure via R2 domain access)

type: R2

name: (empty string)

content: R2 bucket with output files

www

type: A

name: www

content: 192.0.2.1

R2

Create a bucket and upload the output files.

Add a custom domain with your domain name.

Rules

Single Redirect Rule

name: www

type: wildcard pattern

pattern: https://www.*

redirect: https://${1} (301)

preserve query string: yes

URL Rewrite Rule

name: index.html

type: custom filter expression

expression: (ends_with(http.request.uri.path, "/")) path: dynamic rewrite to concat(http.request.uri.path, "index.html")

query string: preserve

URL Rewrite Rule

name: page numbers

type: custom filter expression

expression: (http.request.uri.query contains "page")

path: dynamic rewrite to concat(http.request.uri.path, "index.html", "%3Fpage%3D", http.request.uri.args["page"][0])

query: rewrite to static (empty string)

Clone this wiki locally