The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Api2 : Park Domain Redirecting It To External Url

Discussion in 'cPanel Developers' started by Darma, Jul 31, 2015.

  1. Darma

    Darma Member

    Joined:
    Jul 31, 2015
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Belgium
    cPanel Access Level:
    Reseller Owner
    Hi,

    I have a php script that parks a domain and redirects them to an existing domain in the server or when omitting topdomain to the main domain of the account. It works fine. However ...

    I would like to know the way to achieve redirecting the parked domain to an external domain, like it is achieved on this page of CPanel: park/doredirectdomain.html?domain=domain.name

    I have looked on the API, but cannot find any reference about it. 'Park' only accepts domains existing on the local server.

    Any ideas to help me out?

    Thanks,

    Darma
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    There are no equivelent features with cPanel API2, but a feature request for this exists at:

    https://features.cpanel.net/topic/parksetredirecturl-call-in-api2

    You could add the parked domain name through the API and then develop a script that adds the redirect entry into the .htaccess file, as that's all the redirect feature does.

    Thank you.
     
    Darma likes this.
Loading...

Share This Page