Added rewrite url method