Allow front door service URL Rewrite to file instead of path
Allow URL Rewrite to rewrite a path to a file. This would enable users to host single page applications using front door.
Together with URL Redirect and URL Rewrite the scenarios mentioned can be taken care of.
Lars Kemmann commented
Same issue here, this is definitely not resolved; I've had to resort to several workarounds.
Tomasz Krajewski commented
I created a new ticket here https://feedback.azure.com/forums/217313-networking/suggestions/40386583-allow-front-door-service-url-rewrite-to-file-inste as rewriting to files doesn't work as expected. Please vote there so brilliant minds from Microsoft can see it.
Josh Kraker commented
I'm in the same boat as Chris. How can redirect and rewrite accomplish this?
I am currently using the solution of putting index.html into the 404 response of my static website but this still results in azure storage returning a 404 status code which is not ideal.
Chris Duck commented
How does the current url redirect and url rewrite support this scenario? The documentation states that the wildcard matched part of the path is always appended to the rewritten URL. In a SPA application we need the entire path thrown away and the request to be rewritten to /index.html. A redirect does not help here as the goal isn't for the browser to end up on /index.html, it's for the back end web server to only see requests for /index.html.
Peter Lillevold commented
My scenario is initially that I wanted to exclude certain files from caching. So while the main bulk of my static files lends itself nicely to caching, I want a "version.json" to be excluded from the cache so that our SPA app can inspect the currently available app version. I was hoping that adding a specific route to "/version" with URL rewrite to "/version.json" would work. Alas it does not, currently.
So our scenario is not directly the need to rewrite files, but rather be able to exclude certain paths or files under a route from being included in the cache.
We're also looking forward to this feature. We'd like to directly expose files from a blob store using front door, but want to change the access path in the URL. Of course we can write a simple Azure Function in between, but would be great if this wasn't necessary.
Lukas van Driel (Q42) commented
I use this a lot with Firebase: https://firebase.google.com/docs/hosting/full-config#rewrites
Nathan J. Robinson commented
If you are hosting your static website in bob storage's $web container using the "Static website" feature, you can set your 404 document to be "index.html" and any SPA paths that don't exist in blob storage will return the contents of index.html from the root. This works well for hosting angular SPA aps.
Ralf Friedrich commented
This would be useful to be able to forward to different slots of a web app.
And versioning a web api would be possible as well
Ryan Kelly commented
For example, any route that would 404 to blob storage would be redirected to index.html. Root would also need to be redirected to indeed.html. So we have the scenario /spa-page -> index.html and / -> index.html. This would also help cover multiple spas hosted in a single blob store like so: /app/login -> app/login/index.html and /app/login/app-picker -> /app/login/index.html
Something similar is underway, and so wanted to hear your scenarios/use cases to ensure that the same would covered with the other feature. Can you share examples of what the incoming request would be and what should the forwarding URL?