  In this study, we present the generalization of the concept of $r$-ideals in
commutative rings with nonzero identity. Let $R$ be a commutative ring with
$0\neq1$ and $L(R)$ be the lattice of all ideals of $R$. Suppose that
$\phi:L(R)\rightarrow L(R)\cup\left\{\emptyset\right\}$ is a function. A proper
ideal $I$ of $R$ is called a $\phi-r$-ideal of $R$ if whenever $ab\in I$ and
$Ann(a)=(0)$ imply that $b\in I$ for each $a,b\in R.$ In addition to giving
many properties of $\phi-r$-ideal, we also examine the concept of
$\phi-r$-ideal in trivial ring extension and use them to characterize total
quotient rings.
