Added comment about the missing url encoding in the rewrite function