Description
This function adds hotlink protection for a site. Hotlink protection will redirect users to another URL if they navigate to a file with a specified extension, but an allowed URL did not refer them.
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 |
urls |
string |
Required The site to hotlink protect. |
A valid URL. Note: To protect multiple URLs, separate each URL with a newline character. |
http://example.com/ |
extensions |
string |
Required File types to hotlink protect. |
A valid file extension. Note: To protect multiple file types, use a comma-separated list. |
foo |
allow_null |
Boolean |
Whether the domain allows hotlinks. |
|
1 |
redirect_url |
string |
Required The URL to which the system sends hotlinkers. |
A valid URL. |
http://redirect.example.com/ |
Returns
This function only returns metadata.