How can I change the default "/" route to the index route?
Is there a way to use a different URL route, such as "/home", as the default route instead of "/"?"
4 Replies
xenogeneic-maroon•2y ago
What do you mean the default route
rare-sapphireOP•2y ago
I meant the first route that appears when rendering the router. Let's suppose I have the "/" route and the "/about" route. The router will render "/" as the default. However, the "/" URL does not seem semantic for my app. I'd prefer to use another route as the default, such as "/products", for example. Since I don't plan to declare a "/" URL at all, I would like to use another URL for the default route.
xenogeneic-maroon•2y ago
That's not the router that's just how browsers work, the trailing / is just omitted, if you'd like you can have / serve a permanent redirect but
rare-sapphireOP•2y ago
this should do?"