I have my main site https://1example.com in nextjs and wordpress blog on subdomain https://blog.1example.com. They both are hosted on different servers and diff hostings.
I need my blog to be accessible via subdirectory in main site - https://1example.com/blog
I have successfully proxied nextjs https://1example.com/blog to see blog but blog's internal links, pages, posts, media is still pointing to subdomain.
async rewrites() {return [ { source: '/blog', destination: 'https://blog.1example.com/', }, { source: '/blog/:slug', destination: 'https://blog.1example.com/:slug', // Matched parameters can be used in the destination },]
},
I have tried many solutions but end up breaking wordpress config
Need help
solutions tried