Mike Simmons
Mike Simmons

Reputation: 1298

Azure CDN url rewrite for react app not working

I'm trying to host a React app in Azure blob storage. To do this I need to rewrite all requests to /index.html, while preserving the url in the browser. Various articles describe using Azure CDN to perform the URL Rewrite to direct all requests through index.html. I haven't been able to get this working, here's what I have tried:

Less than

regex

This is what i'm trying to achieve: example

Upvotes: 1

Views: 867

Answers (1)

Mike Simmons
Mike Simmons

Reputation: 1298

I've managed to resolve this using this answer:

https://stackoverflow.com/a/63197547/983599

I had basically picked the wrong condition type, instead of "Request URL" less than 1, it should have been "URL file extension":

enter image description here

Upvotes: 1

Related Questions