I have tried doing the following and it still redirects me to the SPA when visiting the /storybook route:
[[redirects]]
from = "/storybook"
to = "/storybook/index.html"
force = true
# The following redirect is intended for use with most SPAs that handle routing internally.
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
Thanks.
I went through this article and everything seems to be configured correctly.
I even see 2 redirect rules processed in the deploy summary.
However, I still don’t get the behaviour I expect.
Another thing that is happening to me right now, is that the Service Worker fails to register, since it’s request is being fullfilled by the index.html file and therefore I get the following error:
I’m sure this has worked before, I suspect that the fact that I added the storybook redirect made this happen (I also made a drastic change to the SW a few minutes ago, so I may have broken it in the process and it has nothing to do with Netlify’s redirect).
Hi, @theninthsky. The redirect is working when you assess the Netlify site (under flyingnotes.netlify.app).
If you access the site using a custom domain, it isn’t connected to Netlify - not directly anyway. If you navigate to this page you will see there is no custom domain defined here:
We cannot troubleshoot the redirect for the custom domain because the custom domain isn’t connected to Netlify. The custom domain must be pointing to some other service and you will need to contact that service to troubleshoot. If you move the custom domain to connect to the site at Netlify, we will be happy to troubleshoot though.
If there are other questions or concerns, please let us know.
There is a 301 redirect for the first rule which is how the rule is written. There is a 200 response for the second URL because there is a file at that location.
If you are expecting something different to occur, would you please let us know what that is?