Description

This function redirects a parked domain (alias) to a URL.

Examples 


$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
$set_redirect = $cpanel->api1('Park','setredirecturl', array('example.com','http://www.targetdomain.com') ); // Call the function.

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

<cpanel Module="Park::setredirecturl( $FORM('domain','topdomain') )">
cpapi1 --user=username Park setredirecturl example.com http://www.targetdomain.com

http://www.example.com

Parameters

ParameterTypeDescriptionPossible valuesExample
domain

string

Required

The parked domain.

A valid domain name.example.com
topdomainstring

Required

The target URL to which to redirect the domain.

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

Returns

This function returns the target URL as a confirmation message.