How can I use a subdirectory instead of a subdomain?

前端 未结 4 362
予麋鹿
予麋鹿 2020-12-04 20:14

I\'m building a rails app that I\'ll host on Heroku at domain.com. And I\'d like to use WordPress for the blog hosted on phpfog, but I don\'t want to use a subdomain like bl

4条回答
  •  误落风尘
    2020-12-04 20:47

    I'd say your best bet is to try and do a reverse proxy with Rack middleware (akin to Apache's mod_proxy).

    A quick Google search revealed this gem ( https://github.com/jaswope/rack-reverse-proxy ), but the author mentions that it's probably not production-ready. Having a Rack middleware proxy should allow you to forward your subdomain yourdomain.com/blog to another website your-phpfog-account.com/wordpress-installation.

提交回复
热议问题