You use Azure CDN Standard from Microsoft in front of a web app. Requirements: 1) Force HTTPS by redirecting all HTTP requests with a 301, and 2) Internally rewrite requests from /blog/... to /content/blog/... while preserving the remaining path and query string. How should you configure the Rules Engine?
Choose an answer
Tap an option to check your answer.
Correct answer: Create two rules in this order: (1) Match Request scheme = HTTP → Action: URL Redirect (301) to HTTPS. (2) Match URL path begins with /blog/ → Action: URL Rewrite to /content/blog/{path}, preserving the query string..
Why this is the answer
The correct option addresses both requirements using the Azure CDN Rules Engine. The first rule, matching HTTP requests and redirecting to HTTPS with a 301 (Permanent Redirect), ensures all traffic uses HTTPS as required. This rule should execute first to ensure secure communication before any other processing. The second rule, matching paths beginning with /blog/ and rewriting them to /content/blog/ while preserving the rest of the path and query string, fulfills the internal rewrite requirement. The {path} variable in the rewrite action is crucial for preserving the remaining path. The incorrect options fail for several reasons: A single rule cannot combine a redirect and a rewrite in this manner. Configuring rewrite logic on the origin or using DNS provider page rules bypasses the CDN's capabilities and adds unnecessary complexity, as the CDN Rules Engine is designed for these exact scenarios.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed