Freedom To Learn ……….

Writing, to me, is simply thinking through my fingers. — Isaac Asimov

How to change Joomla Admin Folder Name or Path ?

3 Comments

Many times people ask me, how you secure your joomla website,specially how to protect your admin side of website.So I think about to change the admin url.
By default, every joomla programmer know the default url of admin directory i.e. http://sitename.com/administrator/ .

So I want to hide or just don’t want to give direct access to that url, after googling, found that changing the folder name ‘administrator’ to ‘myadmin” & change the ,

define( ‘JPATH_ADMINISTRATOR’, JPATH_ROOT.DS.’administrator’ );  to

define( ‘JPATH_ADMINISTRATOR’, JPATH_ROOT.DS.’myadmin’ );

in the ‘includes->defines.php’ & ‘administrator->includes->defines.php’ doesn create some problem in thired party component.

So finally I found another trick which work for me, is as below.

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

<?php
$admin_cookie_code=”999999999″;
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'] != “999999999”)
{
header(“Location: ../index.php”);
}
This works for me, I hope it will help others also.
About these ads

Author: gaurishpatil

PHP Developer..

3 thoughts on “How to change Joomla Admin Folder Name or Path ?

  1. i have try above code but only redicter to to real adminstrator folder when i typ myadmin.

    i want to change adminstrator to myadmin for security.

    Thanks

  2. Hi there, just became alert to your blog through Google, and
    found that it is really informative. I am gonna watch out for brussels.
    I will appreciate if you continue this in future. Many people will
    be benefited from your writing. Cheers!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.