1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| curl -X POST "https://api.cloudflare.com/client/v4/zones/<zone_id>/pagerules" \ -H "X-Auth-Email: <email>" \ -H "X-Auth-Key: <api_key>" \ -H "Content-Type: application/json" \ --data '{"targets":[{"target":"url","constraint":{"operator":"matches","value":"http://love4026.org/*"}}],"actions":[{"id":"forwarding_url","value":{"url": "https://www.love4026.org/$1", "status_code": 301}}],"priority":1,"status":"active"}'
curl -X POST "https://api.cloudflare.com/client/v4/zones/<zone_id>/pagerules" \ -H "X-Auth-Email: <email>" \ -H "X-Auth-Key: <api_key>" \ -H "Content-Type: application/json" \ --data '{"targets":[{"target":"url","constraint":{"operator":"matches","value":"http://www.love4026.org/*"}}],"actions":[{"id":"forwarding_url","value":{"url": "https://www.love4026.org/$1", "status_code": 301}}],"priority":1,"status":"active"}'
curl -X POST "https://api.cloudflare.com/client/v4/zones/<zone_id>/pagerules" \ -H "X-Auth-Email: <email>" \ -H "X-Auth-Key: <api_key>" \ -H "Content-Type: application/json" \ --data '{"targets":[{"target":"url","constraint":{"operator":"matches","value":"https://love4026.org/*"}}],"actions":[{"id":"forwarding_url","value":{"url": "https://www.love4026.org/$1", "status_code": 301}}],"priority":1,"status":"active"}'
|