Enable hosts in a subpath

This PR enables hosts in a subpath. This is needed when configuring ElasticTastic to work with Heroku ElasticSearch Addons.