How can I put a rails app and a wordpress blog on the same domain?

I have a rails 4 app that’s hosted on Heroku. Let’s say its domain is www.example.com.

I would like to set up a wordpress blog that’s hosted elsewhere. I would like the blog to live at www.example.com/blog.

Read More

That is, I want to use a subdirectory instead of a subdomain. This is for SEO purposes.

Could you please provide advice on how I can implement this?

UPDATE: This is a new site, and the blog isn’t set up yet. So there are not any incoming links to worry about breaking.

UPDATE #2: I tried using rack-reverse-proxy on heroku. The /blog/ pages were rendering fine. However, I would actually get redirected to blog.example.com/blog/ instead of keeping the displayed url www.example.com/blog/. I used the same code in the rack-reverse-proxy README. However, I can’t find any evidence of anyone having done this successfully with rails 4. I moved the server from heroku to EC2 and now I’m going to try some more stuff.

Related posts

Leave a Reply

1 comment