mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-09-20 06:46:19 +08:00
DOCS: add docs for NS1_URLFWD (#3075)
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
This commit is contained in:
parent
5a20c6609e
commit
2b1aa5fb6d
|
@ -11,6 +11,28 @@ parameter_types:
|
|||
"modifiers...": RecordModifier[]
|
||||
---
|
||||
|
||||
{% hint style="info" %}
|
||||
Documentation needed.
|
||||
`NS1_URLFWD` is an NS1-specific feature that maps to NS1's URLFWD record, which creates HTTP 301 (permanent) or 302 (temporary) redirects.
|
||||
|
||||
|
||||
{% code title="dnsconfig.js" %}
|
||||
```javascript
|
||||
D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER),
|
||||
NS1_URLFWD("urlfwd", "/ http://example.com 302 2 0")
|
||||
);
|
||||
```
|
||||
{% endcode %}
|
||||
|
||||
The fields are:
|
||||
* name: the record name
|
||||
* target: a complex field containing the following, space separated:
|
||||
* from - the path to match
|
||||
* to - the url to redirect to
|
||||
* redirectType - (0 - masking, 301, 302)
|
||||
* pathForwardingMode - (0 - All, 1 - Capture, 2 - None)
|
||||
* queryForwardingMode - (0 - disabled, 1 - enabled)
|
||||
|
||||
{% hint style="warning" %}
|
||||
**WARNING**: According to NS1, this type of record is deprecated and in the process
|
||||
of being replaced by the premium-only `REDIRECT` record type. While still able to be
|
||||
configured through the API, as suggested by NS1, please try not to use it, going forward.
|
||||
{% endhint %}
|
||||
|
|
Loading…
Reference in a new issue