I have a blog hosted on a remote server than our front end. I want to point our http://domain.com/blog into http://blog.domain.com which is where our current blog resides (the virtual host leads to a different machine).
- So: http://www.domain.com/blog/my-post
- Should discretely point to: http://blog.domain.com/my-post
I've tried several ways to do this, but to no avail:
<Location "/blog">
# Blog proxy
ProxyPreserveHost On
ProxyPass /blog http://blog.domain.com # with/without /blog
ProxyPassReverse /blog http://blog.domain.com # with/without /blog
</Location>
Also outside <Location>
:
# Blog proxy
ProxyPreserveHost On
ProxyPass /blog http://blog.domain.com
ProxyPassReverse /blog http://blog.domain.com
Also tried with/without trailing slashes.
Can't get it to work.
I made sure the .htaccess
in the http://domain.com/ root is ignoring any rewriterules pointing to $/?blog
by using RewriteCond %{REQUEST_URI} !^/?blog
, but still nothing. I just get a 404. The directory shouldn't exist, should it?
Any ideas? Thanks!