How would I redirect all of the traffic from http://mysite.com/blog to a different server running at http://blog.mysite.com???

I want to do a 301 permanent redirect from http://blog.mysite.com to http://mysite.com/blog, but I want to keep the blog server running on http://blog.mysite.com, but I want it to appear to the user that they are viewing http://mysite.com/blog.

link|improve this question

76% accept rate
feedback

2 Answers

up vote 1 down vote accepted

you must proxy the "/blog" url to the blog server.

link|improve this answer
1  
This is indeed the only way to do it, but it should be added that usually it's a bad idea to do so. You get extra latency on each page view, and form submissions, pingbacks etc are hard to handle when proxied. – Jesper Mortensen Sep 5 '09 at 23:45
feedback

Here is an example: http://yuji.wordpress.com/2010/03/08/nginx-wordpress-proxy-subdirectory-to-wordpress-subdomain/

Yes it seems like a bad idea though :(

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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