Rewrite URL fix