Rewrite deep linking mechanism