Description
This function lists the redirects in an account's .htaccess
files.
Examples
Note:
Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.
Parameters
Parameter |
Type |
Description |
Possible values |
Example |
regex |
string |
A Perl Compatible Regular Expression (PCRE) that filters the results. The system matches the PCRE to both the email address's username and domain. |
A valid regex expression. |
/^[a-z0-9_-]{6,18}$/ |
Returns
Return |
Type |
Description |
Possible values |
Example |
urldomain |
string |
The domain to redirect. |
A valid domain. |
example.com |
source |
string |
The file within the domain to test. |
A valid filename and path, relative to the home directory. |
/marceau.html |
targeturl |
string |
The redirect's destination. |
A valid URL. |
http://redirect.example.com/ |
destination |
string |
The redirect's destination. |
A valid URL. |
http://redirect.example.com/ |
sourceurl |
string |
The file within the domain to test. |
A valid filename and path, relative to the home directory. |
/marceau.html |
displaydomain |
string |
The domain to redirect. |
ALL is the only possible value. |
ALL |
displaysourceurl |
string |
The file within the domain to test. |
A valid filename and path, relative to the home directory. |
/marceau.html |
wildcard_text |
string |
Whether the Wild Card Redirect option is active. |
|
checked |
matchwww_text |
string |
Whether Redirect With www.option is active. |
|
checked |
domain |
string |
The domain to redirect. |
A valid domain name. |
example.com |
kind |
string |
The kind of redirect. |
rewrite is the only possible value. |
rewrite |
docroot |
string |
The source domain's document root. |
A valid absolute file path. |
/home/example/public_html |
matchwww |
Boolean |
Whether the redirect matches www. subdomains. |
|
1 |
type |
string |
Whether the redirect is permanent or temporary. |
|
permanent |
wildcard |
Boolean |
Whether the wildcard subdomains match. |
|
1 |