Rewrite url resolving to fix problem on Windows