rewrite relative URL to tolerate slugs