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

A site currently exists at www.foo.com.

I need to setup a (wordpress) blog at www.foo.com/blog, but on a separate server (with a domain something like blog.bar.com). The site visitors should only see the www.foo.com/blog URL.

So:

User sees                     Target URL
-----------------------       ---------------------
www.foo.com/               -> www.foo.com/
www.foo.com/blog           -> blog.bar.com/ 
www.foo.com/blog/wp-admin/ -> blog.bar.com/wp-admin

This is all do-able using some (a) rewrite rule(s), I'm assuming ?

Does the fact that the blog content will be accessible via 2 completely different URLs cause any problems (especially SEO) ? Is it possible (and desirable), to block access via the blog.bar.com URL ?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

This is accomplishable using a simple Apache redirect (don't even need rewrite).

Redirect permanent /blog http://blog.bar.com

And yes, having the same site accessible via two domains will cause SEO problems.

Now, I don't know what access you have to the various components, but you could also accomplish similar stuff with DNS by e.g. CNAMING blog.bar.com to www.foo.com and adding a foo.com vhost.

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.