mirror of
https://github.com/skoelle/moonweb-site.git
synced 2026-09-17 17:00:25 +00:00
- scripts/cloudflare/setup-redirects.sh: CLI tool to manage redirects - scripts/cloudflare/redirect-rules.json: rule definitions - .github/workflows/cloudflare-redirects.yml: manual trigger workflow - Supports: apply, status, dry-run, delete - Requires secrets: CLOUDFLARE_API_TOKEN, CLOUDFLARE_ZONE_ID
73 lines
2.0 KiB
JSON
73 lines
2.0 KiB
JSON
[
|
|
{
|
|
"expression": "http.host eq \"hub.moonweb.org\"",
|
|
"description": "hub.moonweb.org -> www.moonweb.org",
|
|
"action": "redirect",
|
|
"action_parameters": {
|
|
"from_value": {
|
|
"target_url": {
|
|
"expression": "concat(\"https://www.moonweb.org\", http.request.uri.path)"
|
|
},
|
|
"status_code": 301,
|
|
"preserve_query_string": true
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"expression": "http.host eq \"infra.moonweb.org\"",
|
|
"description": "infra.moonweb.org -> www.moonweb.org/infra/",
|
|
"action": "redirect",
|
|
"action_parameters": {
|
|
"from_value": {
|
|
"target_url": {
|
|
"expression": "concat(\"https://www.moonweb.org/infra\", http.request.uri.path)"
|
|
},
|
|
"status_code": 301,
|
|
"preserve_query_string": true
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"expression": "http.host eq \"smarthome.moonweb.org\"",
|
|
"description": "smarthome.moonweb.org -> www.moonweb.org/smarthome/",
|
|
"action": "redirect",
|
|
"action_parameters": {
|
|
"from_value": {
|
|
"target_url": {
|
|
"expression": "concat(\"https://www.moonweb.org/smarthome\", http.request.uri.path)"
|
|
},
|
|
"status_code": 301,
|
|
"preserve_query_string": true
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"expression": "http.host eq \"code.moonweb.org\"",
|
|
"description": "code.moonweb.org -> www.moonweb.org/code/",
|
|
"action": "redirect",
|
|
"action_parameters": {
|
|
"from_value": {
|
|
"target_url": {
|
|
"expression": "concat(\"https://www.moonweb.org/code\", http.request.uri.path)"
|
|
},
|
|
"status_code": 301,
|
|
"preserve_query_string": true
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"expression": "http.host eq \"retro.moonweb.org\"",
|
|
"description": "retro.moonweb.org -> www.moonweb.org/retro/",
|
|
"action": "redirect",
|
|
"action_parameters": {
|
|
"from_value": {
|
|
"target_url": {
|
|
"expression": "concat(\"https://www.moonweb.org/retro\", http.request.uri.path)"
|
|
},
|
|
"status_code": 301,
|
|
"preserve_query_string": true
|
|
}
|
|
}
|
|
}
|
|
]
|