[core] extend dir redirection to take HTTP status