Child pages
  • cPanel API 1 Functions - Mime::del_redirect

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

Excerpt

This function removes a redirect from an account's .htaccess file.


Warning
titleWarning:

Include Page
LIB:_cPanelAPI1NewerFunctions
LIB:_cPanelAPI1NewerFunctions

Multiexcerpt include
SpaceWithExcerptcom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@12665
MultiExcerptNameAPIDisabledWebServerRole
PageWithExcerptLIB:_ServerRoleDisabledAPI

Panel
bgColor#F2F2F2
borderStylenone

Examples 


Panel
bgColor#FFFFFF
borderStylenone


Expand
titleLiveAPI PHP Class


Code Block
languagephp
linenumberstrue
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
$del_redirect = $cpanel->api1('Mime', 'del_redirect', array('directory/redirect-me','example.com','/home/user/public_html/example.com') ); // Call the function.

Include Page
LIB:_LiveAPIPHPLink
LIB:_LiveAPIPHPLink


Expand
titleLiveAPI Perl Module


Code Block
languageperl
linenumberstrue
my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
my $del_redirect = $cpliveapi->api1('Mime', 'del_redirect', ['directory/redirect-me','example.com','/home/user/public_html/example.com'] ); # Call the function.

Include Page
LIB:_LiveAPIPerlLink
LIB:_LiveAPIPerlLink


Expand
titlecPanel Tag System (deprecated)

Include Page
LIB:_cPanelTagsWarning
LIB:_cPanelTagsWarning

Code Block
languagetext
<cpanel Module="Mime::del_redirect( $FORM('src','domain','docroot') )">



Expand
titleCommand Line


Code Block
languagebash
cpapi1 --user=username Mime del_redirect directory/redirect-me example.com public_html/example.com

Include Page
LIB:_cPanelAPI1CLINote
LIB:_cPanelAPI1CLINote


Expand
titleOutput (none)

This function does not return output.



Parameters

ParameterTypeDescriptionPossible ValuesExample
src
string

Required

The page from which to remove the redirector, without the domain.

A valid file path.
directory/redirect-me
domainstring

Required

The redirector's domain.

Any valid file extension.
example.com
docrootstring

Required

The document root that contains the .htaccess file to change.

A valid file path, relative to the user's home directory.public_html/example.com

Returns

This function does not return output.