How can I implement a redirect rule that applies to all links with the .html extension by removing it? Example: https://domainname.com/.../article.html → redirect to https://domainname.com/.../article
You can create a Redirect Rule with the
http.request.uri.path.extension field to match
html and the
substring() function to remove the last 5 characters from the path.
When incoming requests match... lower(http.request.uri.path.extension) eq "html"
Type: Dynamic Expression: concat("https://www.example.com", substring(http.request.uri.path, 0,-5)) Preserve Query String: Yes