I’m wanting to host various CRA React apps under a single host name. I want to update various projects independently so as such they’re different netlify apps, auto deployed from GitHub. I’d like to preferably appended at the end of the base domain (like /projects/pokemon-info-app/), but if needed a subdomain can be fine.
Using Pokemon Info App as an example…
App name: DerpPrincess Dev Website
Netlify Link: https://derpprincess.netlify.app/
Hosted Link: https://www.derpprincess.xyz/
GitHub Repository: Private
Internal Routing:
Route exact path=“/” component={Landing} />
Route exact path=“/Blog” component={Blog} />
Route exact path=“/About” component={About} />
Route component={Error404} />
App name: Pokemon Info App
Netlify Link: https://pokemoninfoapp.netlify.app/
GitHub Repository: GitHub - DerpPrincess/pokemon-info-app
Internal Routing:
Route exact path=“/” component={Display} />
Route path=“/:pokemon” component={Display} />
Is this solution to this proxying? Routing for all React apps are of course handled internally using react router. I have in the main directly of DerpPrincess Dev Website GitHub repo a netlify.toml file which has this:
The following redirect is intended for use with most SPAs that handle
routing internally.
[[redirects]]
from = “/*”
to = “/index.html”
status = 200
I tried this too, didn’t work … unfortunately
[[redirects]]
from = “/projects/pokemon-info-app/"
to = "https://pokemoninfoapp.netlify.app/”
status = 200
force = true
And in the public folder of the DerpPrincess Dev Website GitHub repo I have a _redirects file which has this :
/* /index.html 200
I did try adding:
/projects/pokemon-info-app/* https://pokemoninfoapp.netlify.app/ 200
But that didn’t seem to do anything, it simply redirected to 404 as per internal routing of DerpPrincess Dev Website app.
How do I handle this with Netlify?