This function enables or disables secure redirects (HTTPS) for the cPanel account's domains that you specify.
Important:
To call this function, one of the following conditions must exist:
domains required | string A comma-separated list of the cPanel account's domains for which to enable or disable secure redirects. Important: To enable or disable redirects for addon domains, you must pass the addon domain and its subdomain. Example: domains=main.example,addon.example,addon.main.example |
state required | integer Whether to enable or disable redirects for the specified domains.
Example: state=1 |
apiversion | integer The version of the API. |
func | string The name of the method called. |
module | string The name of the module called. |
object |
uapi --user=username SSL toggle_ssl_redirect_for_domains domains='main.example,addon.example,addon.main.example' state='1'
{- "apiversion": 3,
- "func": "toggle_ssl_redirect_for_domains",
- "module": "SSL",
- "result": {
- "data": [
- "main.example",
- "addon.example",
- "addon.main.example"
], - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}