Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    56
    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,216
    Likes Received:
    10
    Trophy Points:
    313
    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:
    56
    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,216
    Likes Received:
    10
    Trophy Points:
    313
    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:
    56
    cPanel Access Level:
    Reseller Owner
    Thanks, del_redirect() is exactly what I need.
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice