  Let M be an N-function satisfying the $\Delta_2$- condition, let $\omega,
\vp$ be two other functions, $\omega\ge 0$. We study Hardy-type inequalities \[
\int_{\rp} M(\omega (x)|u(x)|) {\rm exp}(-\vp (x))dx \le C\int_{\rp} M(|u'(x)|)
{\rm exp}(-\vp (x))dx, \] where $u$ belongs to some dilation invariant set
${\cal R}$ contained in the space of locally absolutely continuous functions.
We give sufficient conditions the triple $(\omega,\vp,M)$ must satisfy in order
to have such inequalities valid for $u$ from a given set ${\cal R}$. The set
${\cal R}$ can be smaller than the set of Hardy transforms. Bounds for
constants, retrieving classical Hardy inequalities with best constants, are
also given.
