Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

How can I point the DNS in order to have /blog and / in 2 different servers?

One of them is on PHPFog (PHP hosting) and the other on Heroku (Rails Hosting).

Regards.

Thanks

share|improve this question

3 Answers 3

up vote 3 down vote accepted

Essentially, you can't; that's not an issue for the DNS, because it only handles hostnames, not HTTP pathnames on a given host. Your choices include

  1. Host the main site on example.com and blog on blog.example.com, in which case you can do it with the DNS - just publish the relevant A record for each zonefile entry.
  2. Host the blog on a disposable domain name, and use ReWrite rules to proxy example.com/blog to the dispoable blog path, rewriting any links on the way through.

1) would be much easier, if you're not wedded to example.com/blog.

share|improve this answer
    
Darn you MadHatter! - This is the better answer @donald. –  Mister IT Guru Mar 11 '11 at 11:49
    
I'm just worried with SEO. If I use blog.domain.com I'll lose some SEO juice so I heard. –  donald Mar 11 '11 at 11:56
    
Mister Guru: <LARGE GRIN> sorry! I'll try to be worse! Donald: SEO juice? –  MadHatter Mar 11 '11 at 16:15

Use a subdomain instead: blog.domain.com - many sites do it this way.

share|improve this answer

I don't think DNS is what you need to look into to make this happen. I think you'll need to have a redirect setup, if memory serves me right.

You configure this on your webserver.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.