I have my main site [https://mysite.com](https://mysite.com) in nextjs and wordpress blog on subdomain [https://blog.mysite.com](https://blog.mysite.com). They both are hosted on different servers and diff hostings.
​
I need my blog to be accessible via subdirectory in main site – [https://mysite.com/blog](https://mysite.com/blog)
​
I have successfully proxied nextjs [https://mysite.com/blog](https://mysite.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.mysite.com/](https://blog.mysite.com/)’,
},
{
source: ‘/blog/:slug’,
destination: ‘[https://blog.mysite.com/:slug](https://blog.mysite.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
\- [https://medium.com/one-weekend-at-a-time/how-to-reverseproxy-wordpress-at-blog-from-any-sub-domain-ec8e5159e305](https://medium.com/one-weekend-at-a-time/how-to-reverseproxy-wordpress-at-blog-from-any-sub-domain-ec8e5159e305)
\- [https://proxyscrape.com/blog/using-a-reverse-proxy-to-install-a-wordpress-blog-for-enhanced-seo](https://proxyscrape.com/blog/using-a-reverse-proxy-to-install-a-wordpress-blog-for-enhanced-seo)
[ad_2]
Sorry to ask, but why?