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.

API 1 Add Redirect

Discussion in 'cPanel Developers' started by HenriqueMachado, Nov 13, 2008.

  1. HenriqueMachado

    HenriqueMachado Registered

    Joined:
    Nov 13, 2008
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    I need to know how the "Mime" "add_redirect" for API 1.

    My objetive is to add redirects by api.

    I'm trying to run the following command that does not work:
    http://SERVER/xml-api/cpanel?user=jaison99&xmlin=<cpanelaction><module>Mime</module><func>add_redirect</func><apiversion>1</apiversion><args></args><args>permanent</args><args>www.senha.com.br</args><args>telecom.net</args><args>0</args><args>0</args></cpanelaction>

    Can you give me a hand ?
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Your first argument (for path, as described in .../mime/addredirect.html) is empty. Thus the call is missing critical information for creating the redirect.

    Are you looking to only redirect entire domains? If so, there is an alternate API call you could use.
     
Loading...

Share This Page