I have a content hosted in azure blob storage, e.g.
https://devsmartek.blob.core.windows.net/employeeprofile/default.png
Can this url be reached using redirect/rewrite rules ?
e.g. https://domain.com/photos/default.png
==> https://devsmartek.blob.core.windows.net/employeeprofile/default.png
I created redirect rule as below, seems to be not working.
[[redirects]]
from = “/photos/*”
to = “https://devsmartek.blob.core.windows.net/employeeprofile/”
status = 200
force = true
Try this
[[redirects]]
from = "/photos/*"
to = "https://devsmartek.blob.core.windows.net/employeeprofile/:splat"
status = 200
force = true
Not sure you really need the force = true
though.
what is the role of :splat here ? and will it load the resources …/folder/folder/xyx.png ?
As per Redirect Options docs
An asterisk indicates a splat that will match anything that follows it.
So you can have
[[redirects]]
from = "/api/*"
to = "https://api.example.com/api/v1/:splat"
status = 200
which means anything after https://yoursite.netlify.app/api/
will get proxied to the example url.
Check out the Exploring Netlify Redirects Mission on Jamstack Explorers for an example using Cloudinary.