rewrite url module, then add test spec