Rewrite pagination url generation