I have mysite.com. Currently my blog is blog.mysite.com
I want my blog to be: mysite.com/blog - which would point to a tumblr blog.
Is it possible to use Rails as a reverse proxy that would main the URL structure at mysite.com/blog and show tumblr content, maintaining the mysite.com/blog url and article urls... Not redirecting to tumblr's URL?
Thanks
Yes it is possible but a very heavy solution. What you need to do is define method on controller that would fetch the remote content and render it.
require 'net/http'
class TunblrController<ApplicationController
def index
uri = URI('http://tumlbr.com/myblog')
html = Net::HTTP.get(uri)
render :html=>html
end
end
that being said, you are much better off doing it using Nginx, HAProxy or other similar solutions
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With