Remove trailing / if pattern is exactly / and app_url is set