Host without subdomain variable in Azure CDN Rules RRS feed

  • Question

  • First of all, I can't seem to find anywhere the available variables to be used for Azure CDN Rules. I'm aware that there is %{host} variable to return the value of the domain used to access the CDN. But it includes subdomains like "www". Is there an available variable to be used to remove those subdomains? What I'm trying to achieve is to ReWrite dynamic html files. So my destination value right now is "$1%{host}.html$2". So if www.example.com is my custom domain then it will be "www.example.com.html". But I want it to render "example.com.html" even if www.example.com is accessed.

    Wednesday, April 18, 2018 12:28 PM

All replies

  • You can try this: %{host#www.}
    We will add this to our documentation asap.
    Thursday, April 26, 2018 1:44 AM
  • The # is a delimiter that means delete the matching string that comes after this. 
    Thursday, April 26, 2018 1:45 AM