\documentclass[a4paper]{book}
\usepackage{fancybox}           % Fancy boxes.
\usepackage[pagebackref]{hyperref}

\begin{document}

% Check pagebackref links.
\thisfancypage{%
  \shadowbox
}{}

\frontmatter
Hello World (frontmatter): \cite{a}
\mainmatter
Hello World (mainmatter): \cite{a}
\chapter{Chapter}
Hello World: \cite{a}

\begin{thebibliography}{999}
\bibitem{a} Foo bar

\end{thebibliography}
\end{document}
