adds express middleware to rewrite /r/* links to /.