CMS Made Simple Forums
https://forum.cmsmadesimple.org/

[closed] change admin_url
https://forum.cmsmadesimple.org/viewtopic.php?f=80&t=61717
Page 1 of 1

Author:  Rolf [ Tue Jun 26, 2012 7:26 pm ]
Post subject:  [closed] change admin_url

changed admin folder name to "admin2"

No change in config.php
http://localhost/trunk/admin2 redirects to http://localhost/trunk/admin2/admin/login.php (error404)

Author:  brunettdan [ Tue Jun 26, 2012 8:44 pm ]
Post subject:  Re: change admin_url

Works for me..

I changed to http://domain.se/admincms/

String in config file:
\$1:
$config['admin_dir'] = 'admincms';


Running beta2
apache/2.2.16 (debian)

Author:  Rolf [ Wed Jun 27, 2012 8:58 am ]
Post subject:  Re: change admin_url

Directly open: http://localhost/public/trunk/admin2/login.php

Fatal error: Call to a member function do_login() on a non-object in C:\www\public\trunk\admin2\login.php on line 371

Author:  calguy1000 [ Wed Jun 27, 2012 3:27 pm ]
Post subject:  Re: change admin_url

This is correct. If a bit ugly, but I don't see an effective fix either..

The REQUESTED URI is /admin2/index.php .. but cmsms sees that you are not logged in, so attempts to redirect you to the proper login page. if the admin_dir is not set in the config.php it assumes that the 'admin_dir' is 'admin'.

So when the root_url is calculated, because the 'admin_dir' is not part of the REQUEST_URI it returns <site>/admin2/index.php (remember the admin_dir config variable is still 'admin')

Now when calculating the 'admin_url' config variable it just appends the 'admin_dir' to the calculated 'root_url', which in this case is '<site>/admin2/admin' and then adds 'login.php' so you get <site>/admin2/admin/login.php.

Author:  Rolf [ Fri Jul 13, 2012 10:16 am ]
Post subject:  Re: [parked] change admin_url

in new install SVN rev. 8175 changing admin foldername to "myadmin":
Fatal error: Call to a member function AddNotification() on a non-object in C:\www\trunk\myadmin\header.php on line 45

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/