Feature Overview
If a resource on the origin server relocates, the URL of the resource changes. When user requests use the original URL, CDN POPs must rewrite the URL so that the requests can be redirected to the new URL. For example, a video-on-demand (VOD) file is moved from the /stream/ directory to the /vod/ directory. Through 302 redirect, the can obtain the changed URL in the Location header and resend an access request to the edge node. This ensures that the user can obtain the correct file.
Cautions
• For this feature to take effect, the clients must support redirection.
• This feature supports the following status codes: 301, 302, 303, 307, and 308.
Procedure
Currently, this feature cannot be configured on your own. To configure this feature, pleasesubmit a ticket to the eSurfing Cloud’s technical support team.
When submitting a ticket, provide the following information:
Parameter | Description |
Status Code | Example: 302. |
Path to be rewritten | The path that starts with a forward slash (/) and does not contain http:// or domain names, support Perl Compatible Regular Expressions (PCRE), such as ^/qpdxv/(.*). |
Target Path | The path that starts with <protocol>://<domain name>. The protocol can be http or https and supports PCRE. For example, $1 and $2 are often used to capture the strings that are enclosed in parentheses within the path to be rewritten. The target path can be specified as $scheme://www.ctyun.cn/videos/$1. |