Proper redirects with status codes (SEO reasons)
- I'm submitting a ...
- [x] feature request
- What modules are related to this Issue?
- [x] aspnetcore-engine
- [x] express-engine
- [x] hapi-engine
-
Do you want to request a feature or report a bug? Request a feature
-
What is the current behavior? Currently, if we have a
redirectToin our route config orrouter.navigateorrouter.navigateByUrlin our code, Universal renders the appropriate component, but doesn't actually do a redirect. -
What is the expected behavior? Given a
redirectToin our route config orrouter.navigate/navigateByUrlanywhere in our code, Universal should actually redirect to the appropriate route. -
What is the motivation / use case for changing the behavior? For SEO reasons. We wouldn't want to render content on "wrong" route. Ideally, the
@angular/routershould also facilitate a way to let Universal know what status code is needed (but that would be an issue for the router). -
Please tell us about your environment:
- Angular version: 4+
- Platform: [NodeJs]