decode url before searching if it's a rewritten url