I used this method and it seems to work. I choose not to use shell, because I'm not comfortable using it and don't want to mess anything up.
After modifying the .htaccess file to redirect /admin/ to 404 page, I created a .php file in GS root directory and used the php symlink function.
I simply put the following in the .php file and went to the page in the browser:
Once the page loaded, the symlink was created and I just deleted that .php file.
Remember, if using symlinks, make sure "Options +FollowSymLinks" is in your .htaccess file.
- Chris
After modifying the .htaccess file to redirect /admin/ to 404 page, I created a .php file in GS root directory and used the php symlink function.
I simply put the following in the .php file and went to the page in the browser:
PHP Code:
<?php symlink('/home/site/public_html/admin', '/home/site/public_html/newadminlocation'); ?>
Once the page loaded, the symlink was created and I just deleted that .php file.
Remember, if using symlinks, make sure "Options +FollowSymLinks" is in your .htaccess file.
- Chris
(2010-10-06, 13:54:31)yojoe Wrote: K, here's my 1st solution to change admin's panel address.
It needs access to shell, as there has to be created a symbolic link to admin's directory.
I've got one more idea, but I'll test it later.
Those who have access to shell, and are willing to hide /admin URI to disallow unauthorized access, here's the list of things needed to be done.
1. disable access to /admin, and let visitor know, that there's no data under this path
It's quite simple, as we will just show him 404 error page
Add to .htaccess below lines
First line looks if URI/URL contains "admin" string. If it's true, then we serve a 404 html document (page not found). Since my testing environment stays under a subdomain, a 404 error page has to stay somewhere inside GS directory tree. So be sure to provide a valid path to error page, any page you'd like to show, instead of admin panel, or a non existing page.Code:RewriteCond %{REQUEST_URI} =/admin/
RewriteRule ^(.*) 404.html [R=301,L]
2. Time to add a symbolic link, to have access to admin panel.
Login to your shell account (using for example putty). Browse to gs root directory, and create a symbolic link using below command
where "hiddenpanel" is the name, under which you will have access to your GS admin panel.Code:ln -s admin hiddenpanel
After finishing second step, test if everything works as supposed.
You should get an error page after entering http://yourdomain/admin, while using http://yourdomain/hiddenpanel should give you access to GS admin panel.
I'll try to provide a solution based only on htaccess, for those who don't have access to shell on their hosting accounts. At least if everything works well