# Return .htaccess files' redirects This function lists the redirects in an account's .htaccess files. When you disable the Web Server role, the system this function. Endpoint: GET /Mime/list_redirects Version: 11.134.0.5 Security: BasicAuth ## Query parameters: - `destination` (string) The string with which to filter results. This will return results that match the parameter . Example: "http://example.tld" - `regex` (string) A Perl regular expression that filters the results. The system matches the regular expression to the return value. Example: "\"^[a-z0-9_-]{6,18}$\"" ## Response 200 fields (application/json): - `apiversion` (integer) The version of the API. Example: 3 - `func` (string) The name of the method called. Example: "list_redirects" - `module` (string) The name of the module called. Example: "Mime" - `result` (object) - `result.data` (array) - `result.data.destination` (string) The redirect's destination URL. Example: "http://redirect.example.com/" - `result.data.displaydomain` (string) The domain to redirect. * is the only possible value. Enum: "ALL" - `result.data.displaysourceurl` (string) The path to the file within the domain to test, relative to the home directory. Example: "/marceau.html" - `result.data.docroot` (string) The absolute file path to the source domain's document root. Example: "/home/example/public_html" - `result.data.domain` (string) The domain to redirect. Example: "example.com" - `result.data.kind` (string) The kind of redirect. * — The request sent a redirect to another path on the server. * — The request sent a redirect for the URL. * — The request sent a redirect based on a regular expression match of the URL. Enum: "rewrite", "redirect", "redirectmatch" - `result.data.matchwww` (integer) Whether the redirect matches subdomains. * — Matches. * — Does not match. Enum: 1, 0 - `result.data.matchwww_text` (string) Whether the [ option](https://go.cpanel.net/Redirects) is active. Redirect with or without www.* option is active. Enum: "checked" - `result.data.opts` (string) The options that the function passes to Apache as part of the [Rewrite rule](https://httpd.apache.org/docs/2.4/rewrite/flags.html#flag_l). Example: "L" - `result.data.source` (string) The path to the file within the domain to test, relative to the home directory. Example: "/marceau.html" - `result.data.sourceurl` (string) The path to the file within the domain to test, relative to the home directory. Example: "/marceau.html" - `result.data.statuscode` (string) The [HTTP Status Code](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) of the request Example: "301" - `result.data.targeturl` (string) The redirect's destination URL. Example: "http://redirect.example.com/" - `result.data.type` (string) Whether the redirect is permanent or temporary. * — The redirect is permanent. * — The redirect is temporary. Enum: "permanent", "temporary" - `result.data.urldomain` (string) The domain to redirect. Example: "example.com" - `result.data.wildcard` (integer) Whether the wildcard subdomains match. * — Matches. * — Does match. Enum: 1, 0 - `result.data.wildcard_text` (string) Whether the [](https://go.cpanel.net/Redirects) option is active. Wild Card Redirect* option is active. Enum: "checked" - `result.errors` (array,null) List of errors if the API failed. - `result.messages` (array,null) List of messages generated by the API. - `result.metadata` (object) - `result.metadata.transformed` (integer) Post-processing may have transformed the data. Enum: 1 - `result.status` (integer) * — Success. * — Failed. Check the field for more details. Enum: 1, 0 - `result.warnings` (array,null) List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.