Manage non-root path URL

This commit continue and finish the work of PR #116, and close issue #97