Small rewrite to support docroot