Access wordpress blog on subdirectory /blog that is running on subdomain

[ad_1]

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]
1 Comment

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer