title: Reverse proxy heroku app to wordpress blog
body: <p>I've managed to setup a reverse proxy of my heroku app with the following in config.ru</p>
  
  <pre><code>require ::File.expand_path('../config/environment',  __FILE__)
  use Rack::ReverseProxy do  
     reverse_proxy /^\/blog(.*)$/, 'http://blog.domain.com$1', opts={:preserve_host =&gt; true}
  end
  run Appname::Application
  </code></pre>
  
  <p>This allows my heroku app to run at domain.com and have domain.com/blog appear as the URL while the wordpress site is being served blog.domain.com.  Great so far.</p>
  
  <p>The wordpress site gets served properly when going to domain.com/blog, however when I go to any deeper page like an individual post wordpress throws an error.  I was using permalinks with the date and title in the URL of the form: domian.com/blog/2012/07/a-great-blog-post - Worpress now seems to not like this.  When I switched the links back to the form domain.com/blog/?p=4 the page gets served successfully.</p>
  
  <p>It seems like it doesn't handle and sort of trailing slashes after the inial domain.com/blog properly.  What I find strange is domain.com/blog/wp-admin (and the entire WP admin app) works without any hiccups.</p>
  
  <p>Can anyone see any glaring issues why the pages/post with multiple slashes '/' might be causing problems?</p>
  
  <p>Thanks in advance!</p>