Select an article to view its FULL content...

How to change Joomla Admin Folder Name or Path ?

If you would like to 'sort of' rename your Joomla administrator directory without having to modify any Joomla code, you can achieve it the following way. Its extremely simple...

   1. Create a new directory in your root directory (eg. "myadmin")
   2. Create an index.php file in your "myadmin" directory..

      ## myadmin/index.php

$admin_cookie_code="1234567890";
setcookie("JoomlaAdminSession",$admin_cookie_code,0,"/");
header("Location: ../administrator/index.php");
?>

   3. Add this to the beginning of index.php in real administrator folder
     
      #administrator/index.php (modify , **do not replace**)
if ($_COOKIE['JoomlaAdminSession'] != "1234567890")
{
header("Location: ../index.php");
}

To enter your Joomla administration page, you point your browser to "http://yoursite.com/myadmin/" The php code will set a cookie that expires at the end of the session and redirect you to your real administration page. No one will be able to load anything from the administrator directory without having gone through the "myadmin" directory first.






1 comments:

cool code - thanks a lot!
martina