URL encode query string when parsing root path