[closed] change admin_url

Post Reply
User avatar
Rolf
Dev Team Member
Dev Team Member
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

[closed] change admin_url

Post by Rolf »

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)
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
brunettdan
New Member
New Member
Posts: 9
Joined: Fri Jun 01, 2012 2:54 pm

Re: change admin_url

Post by brunettdan »

Works for me..

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

String in config file:

Code: Select all

$config['admin_dir'] = 'admincms';
Running beta2
apache/2.2.16 (debian)
User avatar
Rolf
Dev Team Member
Dev Team Member
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: change admin_url

Post by Rolf »

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
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: change admin_url

Post by calguy1000 »

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.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
Rolf
Dev Team Member
Dev Team Member
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: [parked] change admin_url

Post by Rolf »

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
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
Post Reply

Return to “Closed Issues”