Prepares for url-rewrite