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.

Delete redirects

Discussion in 'cPanel Developers' started by lvt, Jun 12, 2009.

  1. lvt

    lvt Well-Known Member

    Joined:
    May 23, 2009
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Reseller Owner
    What is the API function to delete redirects ?

    Thanks.
     
  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
    Code:
    <cpanel Mime="del_redirect($FORM{'path'},$FORM{'domain'},$FORM{'docroot'})">
    
    path is the url path that is being redirected (e.g. /goSomewhere if the redirect was example.com/goSomewhere)

    domain is the domain this redirect was on (e.g. example.com if the redirect was example.com/goSomewhere)

    docroot is the document root for the domain, which will usually be /home/username/public_html where username represents the cPanel user's username.
     
  3. lvt

    lvt Well-Known Member

    Joined:
    May 23, 2009
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Reseller Owner
    Thank you, so this function is not part of the "SubDomain" module like "setsuburl".
     
  4. 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
    Were you referring to subdomain redirects, rather than redirects? If so, that function is:

    Code:
    <cpanel SubDomain="disablesubrd($FORM{'domain'})">
     
  5. lvt

    lvt Well-Known Member

    Joined:
    May 23, 2009
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Reseller Owner
    Thanks, del_redirect() is exactly what I need.
     
Loading...

Share This Page