When I host my site in the root directory the links work fine. But having problem in a subfolder like this "https://main-domain.com/projects". Every time I click any link it redirects me to "https://main-domain.com".
But I want my root directory to be "https://main-domain.com/projects".
in gatsby-config.js used
module.exports = {
pathPrefix: `/projects`,
assetPrefix: `https://main-domain.com`,
}
also built the site with the command
gatsby build --prefix-paths
but it always sends me back to the "https://main-domain.com" path.
How to solve that?
Top comments (0)