rewrite condition for app.php