I know it’s not good to put 2 netlify.toml in a repository and we can use _redirect file as a workaround.
But I’m suspecting this’s a bug netlify watching the wrong place config file.
Hi there! We’re glad to hear you’re enjoying Netlify and thanks for this report One issue that may be getting in the way in Step2 is that your base directory doesn’t have a / after it and the publish directory is not relative to the root, as described here:
Does the index.html publish in that case?
The Step3 you mention is very interesting and weird- I’m guessing that the inner .toml file is being picked up, based on the issues I described above with the outer .toml. It would be interesting if you switched the redirects- from index.html to index2.html. My guess is that even though the redirect is being loaded, it is not doing anything- just publishing the index.html file in the “root” (where the inner .toml is).
Anyway, thanks again and let us know if there’s anything you’d like our help with going forward!
Hi, @mogya. If you change the publish directory in netlify.toml then you must also put a netlify.toml (or _redirects) file in the base of the publish directory.
The redirects in the first netlify.toml, the one which changes the base directory, will never be read.
There is a more detailed explanation of this behavior here:
If there are other questions about this, please let us know.