R2 Static web hosting rules
hello,
I have a SSG site uploaded to public r2 bucket pointing v2.priyashpatil.com. After a while I figured a way to get it working but it requires two rules.
Here's the folder SSG structure looks like:
and i have two rules:
First:
and dynamic rewrite:
Second:
and dynamic rewrite:
Notice both rules are almost identical except i had to do this because "/". I tried path matching
*/*
but it doesn't capture the url without tailing "/". So the urls v2.priyashpatil.com
and v2.priyashpatil.com/contact/
would work but url v2.priyashpatil.com/contact
doesnt work. So I had to do this two rules trick here.
Now is there any way to make it into one rule?2 Replies
Medium
How to replicate Amazon S3 Static website hosting behaviour with R2...
Migrate from Amazon S3 to Cloudflare R2, save $$$ on static hosting! Follow our step-by-step guide & optimize your site today…
This might be it. But still two rules