mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-02-25 16:13:04 +08:00
Cloudflare documentation update (#167)
* Fix syntax errors in documentation * Add example on how to enable manage_redirects
This commit is contained in:
parent
d19e1fb338
commit
b5e4ab1e23
1 changed files with 4 additions and 2 deletions
|
@ -110,6 +110,8 @@ The cloudflare provider can manage Page-Rule based redirects for your domains. S
|
|||
|
||||
// chiphacker.com is an alias for electronics.stackexchange.com
|
||||
|
||||
var CFLARE = NewDnsProvider('cloudflare.com','CLOUDFLAREAPI', {"manage_redirects": true}); // enable manage_redirects
|
||||
|
||||
D("chiphacker.com", REG_NAMECOM, DnsProvider(CFLARE),
|
||||
// must have A records with orange cloud on. Otherwise page rule will never run.
|
||||
A("@","1.2.3.4", CF_PROXY_ON),
|
||||
|
@ -117,10 +119,10 @@ D("chiphacker.com", REG_NAMECOM, DnsProvider(CFLARE),
|
|||
A("meta", "1.2.3.4", CF_PROXY_ON),
|
||||
|
||||
// 302 for meta subdomain
|
||||
CF_TEMP_REDIRECT("meta.chiphacker.com/*", "https://electronics.meta.stackexchange.com/$1),
|
||||
CF_TEMP_REDIRECT("meta.chiphacker.com/*", "https://electronics.meta.stackexchange.com/$1"),
|
||||
|
||||
// 301 all subdomains and preserve path
|
||||
CF_REDIRECT("*chiphacker.com/*", "https://electronics.stackexchange.com/$2),
|
||||
CF_REDIRECT("*chiphacker.com/*", "https://electronics.stackexchange.com/$2"),
|
||||
);
|
||||
{%endhighlight%}
|
||||
|
||||
|
|
Loading…
Reference in a new issue