If you want to replace the default Joomla behaviour of showing a 404 error for restricted content, then you can use the follow custom error handler within your template.

As no core files are modified, and only template changes are made, this is a 'legal' enhancement. Feel free to modify the code to do as you wish.

Simply replace the contents of your error.php file with the following...

xmlns="http://www.w3.org/1999/xhtml" xml:lang=""lang=""dir=""> http-equiv="content-type"content="text/html; charset=utf-8" /> name="language"content="" /> - rel="stylesheet"href="/templates/system/css/system.css"type="text/css" /> rel="stylesheet"href="/templates/ohsadmin/css/position.css"type="text/css"media="screen,projection" /> rel="stylesheet"href="/templates/ohsadmin/css/layout.css"type="text/css"media="screen,projection" /> rel="stylesheet"href="/templates/ohsadmin/css/print.css"type="text/css"media="Print" /> rel="stylesheet"href="/templates/ohsadmin/css/.css"type="text/css" /> rel="stylesheet"href=""type="text/css" /> rel="stylesheet"href="/templates/ohsadmin/css/template_rtl.css"type="text/css" />   
id="all">
id="back">
id="header">
class="logoheader">
id="logo"> src="/"alt="" /> class="header1">

class="skiplinks">
href="#wrapper2"class="u2">
href="#nav"class="u2">
id="line">
id="contentarea2" >
class="left1"id="nav">
class="unseen">

id="wrapper2">
id="errorboxbody">
id="searchbox">
class="unseen">

href="/index.php"title="">


.
id="footer-outer">
id="footer-sub">
id="footer"> style="text-decoration:none"href="http://www.indau.com.au/">Indau.Pty.Ltd ABN 51 008 182 161
    rel="stylesheet"href="/templates/system/css/error.css"type="text/css" /> 
class="error">
id="outline">
id="errorboxoutline">
id="errorboxheader">
id="errorboxbody">
href="/index.php"title="">
href="/index.php?option=com_search"title="">
.
id="techinfo">

The modification is an adaptation of the advanced login redirect on 404 mod by Chad Wagner - http://extensions.joomla.org/extensions/site-management/url-redirection/17970