new-feature-status-code+++ layout = “blog_single_tpl”
description = “With the new Status Code option, you can customize a given HTTP code for the CDN content” title = “New Feature: Status Code”
date = “2018-06-26T00:00:00+03:00”
short_title = “New Feature: Status Code” short_description = “With the new Status Code option, you can customize a given HTTP code for the CDN content.” short_img = “new-feature-status-code/lg_en.jpg” tags = [“CDN”] og_image = “/img/content/new-feature-status-code/ln_en.jpg” redirect = “0” +++
With the new Status Code option, you can customize a given HTTP code for the CDN content. The feature is available in the CDN resource Advanced Settings and in the Rules section. The rules can be applied to all content and it’s also possible to set up response code only for certain files or file types.
You can specify a URL to redirect to (for codes 301, 302, 303, 307, and 308) or the response text (for other codes). Code 444 stops processing without sending a response header. Both redirect URL and response text can contain variables. A redirect URL can also be specified as a URI local to this server, in which case the full URL is formed according to the request scheme and server name and port directives. A URL for temporary redirect with the code 302 can be specified as the sole parameter.
The example above shows how you can restrict access to the files with .mp3 extension returning response code 404 instead.