fixes #4459 - allows proper rendering of pages using root_path
Merge pull request #3751 from thomasmckay/4459

fixes #4459 - allows proper rendering of pages using root_path