Page 1 of 1

Moving Joomla Admin Directory

Posted: Wed Nov 30, 2011 5:13 am
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.

Re: Moving Joomla Admin Directory

Posted: Fri Dec 02, 2011 7:05 am
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 :)

Re: Moving Joomla Admin Directory

Posted: Fri Dec 02, 2011 9:40 am
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. :-)

Re: Moving Joomla Admin Directory

Posted: Fri Dec 02, 2011 9:58 am
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. :)