After Joomla! 1.6.0 the feature of redirecting to login form is not there when trying to access a “protected” page when not logged in. instead of being redirected to login, I started receiving a message:

Error : You are not authorised to view this resource.
Here is the solution:

Open view.html.php file here : /components/com_content/views/article/view.html.php

This file is of Joomla 2.5 version. Near line 100 replace the code with following code :

// Check the view access to the article (the model has already computed the values).
if ($item->params->get(‘access-view’) != true && (($item->params->get(‘show_noauth’) != true &&  $user->get(‘guest’) ))) {

JError::raiseWarning(403, JText::_(‘JERROR_ALERTNOAUTHOR’));
$uri = JFactory::getURI();
$app->redirect(‘index.php?option=com_users&view=login&return=’  . base64_encode($uri),JText::_(‘COM_CONTENT_ERROR_LOGIN_TO_VIEW_ARTICLE’));