Description

This function redirects a subdomain to a URL.

Examples 


$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
$enable_redirect = $cpanel->api1('SubDomain','setsuburl', array('subdomain','http://www.example.com/') ); // Call the function.

my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
my $enable_redirect = $cpliveapi->api1('SubDomain','setsuburl', ['subdomain','http://www.example.com/'] ); # Call the function.

 

<cpanel Module="SubDomain::setsuburl( $FORM('sub','url') )">
cpapi1 --user=username SubDomain setsuburl subdomain http://www.example.com

This function does not return output.

   

Parameters

ParameterTypeDescriptionPossible valuesExample
sub

string

Required

The subdomain to redirect.

A valid subdomain string.

subdomain


urlstring

Required

The URL to which to redirect the subdomain.

A valid URL.http://www.example.com

Returns

This function does not return output.