How to do redirects in Angular Scully project (SSG)

Hi! I’ve deployed to Netlify a personal webpage and successfully used Scully (Angular’s SSG) with blog support.
The issue I’m encountering is with netlify _redirects file.
Before doing the Scully build I used to have /* /index.html 200 in it.
But now that is not working anymore. To be more specific: I get back the index.html of the page that I am in, but as plain html (or so it seems).
Could someone tell me how I need to adjust my _redirects file in the case in which I have deployed a Scully build?
For further clarity you can reproduce the issue I am encountering if you go to my Netlify website (or and navigate to some page (for example Blog) and then refresh the page. You do not get the JavaScript back.

What Scully does in an Angular project is to generate an index.html file for each route.
This way not only I have my main index.html (in the root directory), but I also get a ./contact/index.html and an ./about/index.html and so on.

Ok, I’ve managed to work around it by specifying each route and force the redirect according to the Netlify docs.
For the specifics in my blog I explain how I did it:

Sorry to be slow to get back to you, @gdistel , but welcome to our community!

I do think you found the best way to handle this -if you have multiple single-page app “routers” , you would need to handle each of them separately.

I mentioned this post to our Scully/Angular expert so she might drop in to enlighten us if she has a better practice to recommend!

1 Like

The whole point of prerendering is navigate via those outputed files. You maintain all the hot features of a SPA while you jump in between of those. You can try to remove all the rewrites and the site will run properly (properly, thanks to scully ssg super fast and smooth :smile:). You can always verify if it works by disabling JavaScript on any of your pages - after doing so, you should see the same content (I believe you fully prerender your blog) on a page reload. For now on, it looks like your page is just using standard Angular routing, because of all the route rewrites.