Moving Joomla Admin Directory

Support/Development for PHP
douglaseggleton
Forum User
Forum User
Posts: 69
Joined: Tue Jul 19, 2011 6:30 am
Location: United Kingdom

Moving Joomla Admin Directory

Unread post by douglaseggleton »

I have managed to move a joomla installation from a localmachine to a server on a development hosting account. Absolutely fine.

However, when I then move the site again to a root domain name - It will not let me into the backend, however I kept the database the same (just changed the owner in the plesk database). The admin panel appears, but doesn't let me login.

As the database is the same - It means I could still use the the admin panel on the development hosting account to update the database. This is strange - I have set all the paths in the configuration file.

Any Ideas?

Thanks.
douglaseggleton
Forum User
Forum User
Posts: 69
Joined: Tue Jul 19, 2011 6:30 am
Location: United Kingdom

Re: Moving Joomla Admin Directory

Unread post by douglaseggleton »

The problem was with the .htaccess

joomla.site/administrator/index.php (the index.php is required in the url)

I was rewriting the index.php in the main .htaccess file, so have made an exception in the .htaccess:

RewriteRule ^/administrator - [L]

Work perfectly :)
User avatar
mikeshinn
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 4149
Joined: Thu Feb 07, 2008 7:49 pm
Location: Chantilly, VA

Re: Moving Joomla Admin Directory

Unread post by mikeshinn »

Thanks for posting a fix too, at some point in the future someone else is going to run into this and I know they will be thankfully for a full answer too. :-)
douglaseggleton
Forum User
Forum User
Posts: 69
Joined: Tue Jul 19, 2011 6:30 am
Location: United Kingdom

Re: Moving Joomla Admin Directory

Unread post by douglaseggleton »

RewriteCond %{HTTP_HOST} ^domain\.co.uk [NC]
RewriteRule ^(.*)$ http://www.domain.co.uk/$1 [L,R=301]
RewriteRule ^(administrator)($|/) - [L]
RewriteCond %{THE_REQUEST} ^.*/index\.php
RewriteRule ^(.*)index.php$ http://www.domain.co.uk/$1 [R=301,L]

:) Thats the full thing - redirects non www to www. , removes index.php. :)
Post Reply