Can we remove case sensitivity on static web file resolution?

jeff 1 Reputation point
2021-12-21T15:36:06.073+00:00

Our client is unhappy that the URLs presented by our simple static web - hosted on Azure Static Webs - are case-sensitive after the domain name.

We redirect any errors back to the main page using the configuration file. Still, we are unable to see how to use any rewrite/redirect rules to, for example, push all URLs to resolve in lower case.

Our site is genuinely static - we don't use Function APIs now - just Azure Static Webs and Azure Domain. It is a great solution that runs inexpensively and very fast. This is the only issue we have not been able to resolve.

I've seen requests to remove case sensitivity on blob URLs - with responses that it is not possible. It may just be the underlying services Microsoft is using won't support it (or perhaps the CDNs). Any insights on the implementation or solution ideas are appreciated.

TIA

Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
1,175 questions
{count} votes

2 answers

Sort by: Most helpful
  1. ajkuma 28,036 Reputation points Microsoft Employee Moderator
    2021-12-30T20:34:12.927+00:00

    @ jeff-4261, jeffodell, Apologies for the delay in responding here.

    Kindly check this FAQ | Static Web site for storage

    Why am I getting an HTTP 404 error from a static website?

    This can happen if you refer to a file name by using an incorrect case. For example: Index.html instead of index.html. File names and extensions in the url of a static website are case-sensitive even though they're served over HTTP. This can also happen if your Azure CDN endpoint is not yet provisioned. Wait up to 90 minutes after you provision a new Azure CDN for the propagation to complete.

    Also,
    As mentioned GitHub issue here (by our PG) | Implement lower case url rule | "we don’t have anything planned for this. Our routes and filesystem are currently case sensitive."

    Apologies for any inconvenience with this issue. As @Grmacjon-MSFT mentioned, we have relayed your feedback to our product team, and will follow-up as soon as we have more update.

    Thanks for your patience and co-operation!

    0 comments No comments

  2. Jeffrey Odell 1 Reputation point
    2021-12-30T21:20:14.13+00:00

    Thanks for the response - I read through this post earlier and, since it was for the original "static web hosting in storage" I was hoping the newer Azure Static Web offering might have implemented a solution.

    Our client doesn't like the fact someone can get the case wrong and get a 404. They sent out marketing material (snail mail) with more than just the base domain in the URL. Right now we've redirected to the main site page on errors so that helps.

    Given there are other redirection rules, implementing a redirect with this specific rule, or a regex type rule seems like a reasonable request. I made a request on the Azure Portal - is there another avenue for me to request this from the product team?

    Thanks for taking the time to get me an answer - especially over the holidays ;>


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.