I have two projects I am trying to deploy to domains ‘leadgem-website.netlify.app/’ and ‘leadgem-website.netlify.app/dashboard/’, but the second route is not working.
My first website, (‘leadgem-website.netlify.app’, the ‘/‘ route), appears to work well, and is a simple Vue 2 project. My redirects look like the following for this site:
[[redirects]] from = "/" to = "/index.html" status = 200 [[redirects]] from = "/login" to = "/index.html" status = 200 [[redirects]] from = "/signup" to = "/index.html" status = 200 [[redirects]] from = "/dashboard" to = "https://leadgem-dashboard.netlify.app/" status = 200
My second website, ‘leadgem-dashboard.netlify.app’, the ‘/dashboard/‘ route, uses Vue 3 and Vite, and there are about three different places to specify the “base” route that the site is deployed on. Once in the router as an argument to the Vue’s “createWebHistory” function (API Reference | Vue Router), once in my vite.config.js as “base” (Configuring Vite | Vite), and once in my vue.config.js as “publicPath” (Configuration Reference | Vue CLI). I’ve tried about every combination I can think of among the three, setting all to ‘/dashboard/’, setting some to ‘/‘, etc… For context, my build command is
vite build, and I’m trying to serve files out of a standard
My redirects file for the dashboard website looks like the following:
[[redirects]] from = "/*" to = "/index.html" status = 200
My questions are then, given nested routing of two applications that manage their own routes, what should the netlify.toml look like for both projects?
And for the second website, the ‘/dashboard/‘ route, what should all those config files look like? Should all of them be pointing to the ‘/dashboard/‘ route, or some combination of ‘/dashboard/’ and ‘/‘?