Joomla Restricted Access Error - Home page PDF Print E-mail

Getting 'Restricted Access' on your homepage?

Hopefully this makes it a simple fix!  Copy the code below or code from an index.php file from another of your websites that is working correctly;  save as your index.php on the webserver where you are getting the error 'Restricted Access' in the upper-left corner. 

If your Joomla website has recently been hacked, check your file listing for all files that have been modified lately.   Any new files, delete! (see article: Hacked: GoDaddy or Joomla Component)  Helpful tip: If you have another website up, a quick compare to the files that should be there could be very helpful!  Here's a listing from a site that has not been hacked:

In addition to cleaning up code that should not be there, make sure that you change your passwords on all your admin and ftp programs.  Check with your hosting provider (GoDaddy...) to ensure that the most recent updates are loaded as well.  When you do change your database password, make sure that you change your configuration.php file (var $password ='  ';) appropriately or you won't be able to get in! 

 For more information -- visit: http://docs.joomla.org/Security_and_Performance_FAQs#Site_Recovery

............  CODE  ............................................

<?php
/**
* @version  $Id: index.php 11407 2009-01-09 17:23:42Z willebil $
* @package  Joomla
* @copyright Copyright (C) 2005 - 2009 Open Source Matters. All rights reserved.
* @license  GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/

// Set flag that this is a parent file
define( '_JEXEC', 1 );

define('JPATH_BASE', dirname(__FILE__) );

define( 'DS', DIRECTORY_SEPARATOR );

require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );

JDEBUG ? $_PROFILER->mark( 'afterLoad' ) : null;

/**
 * CREATE THE APPLICATION
 *
 * NOTE :
 */
$mainframe =& JFactory::getApplication('site');

/**
 * INITIALISE THE APPLICATION
 *
 * NOTE :
 */
// set the language
$mainframe->initialise();

JPluginHelper::importPlugin('system');

// trigger the onAfterInitialise events
JDEBUG ? $_PROFILER->mark('afterInitialise') : null;
$mainframe->triggerEvent('onAfterInitialise');

/**
 * ROUTE THE APPLICATION
 *
 * NOTE :
 */
$mainframe->route();

// authorization
$Itemid = JRequest::getInt( 'Itemid');
$mainframe->authorize($Itemid);

// trigger the onAfterRoute events
JDEBUG ? $_PROFILER->mark('afterRoute') : null;
$mainframe->triggerEvent('onAfterRoute');

/**
 * DISPATCH THE APPLICATION
 *
 * NOTE :
 */
$option = JRequest::getCmd('option');
$mainframe->dispatch($option);

// trigger the onAfterDispatch events
JDEBUG ? $_PROFILER->mark('afterDispatch') : null;
$mainframe->triggerEvent('onAfterDispatch');

/**
 * RENDER  THE APPLICATION
 *
 * NOTE :
 */
$mainframe->render();

// trigger the onAfterRender events
JDEBUG ? $_PROFILER->mark('afterRender') : null;
$mainframe->triggerEvent('onAfterRender');

/**
 * RETURN THE RESPONSE
 */
echo JResponse::toString($mainframe->getCfg('gzip'));

 

.......END CODE..................

 

 

 

Total Visitors

mod_vvisit_counterTo Date:1241454

Today: Apr 20, 2014