Change Admin URL Error

Silverstripe Version: 4.5.0

Question:Change Admin URL Error

Hi there!
I tried to change the admin url according to the instructions “”.
As described, the call {myurl}/admin unfortunately generates an error.

Emergency] Uncaught InvalidArgumentException: Missing spec class
GET / admin

Line 404 in /var/www/vhosts/

I found two solutions to this problem:
‘admin’: ‘Silverstripe \ CMS \ Controllers \ RootURLController’
This does not generate an error message. However, the URL remains, which is an unusual behavior.

Therefore I have as solution no. 2:
I created my own controller that generates a 404 error. This behavior really corresponds to an incorrect call of a website.

 *  AdminErrorController

namespace {

use SilverStripe\CMS\Controllers\ContentController;

class AdminErrorController extends ContentController
  protected function init()
  // $this->redirect('/','302'); // ALTERNATIV

This is now called via ‘admin’: ‘AdminErrorController’ and generates a 404 page as desired.

Alternatively, a 302 redirect to / could occur - which then also represents an atypical behavior.

Perhaps the instructions in the guides could be adapted accordingly.

Nevertheless, there are a few problems, which is why I cannot use the URL rewriting yet.

In the “Assets” area there is only an error message “An unknown error has occurred”. Not more.

And with Pages / History nothing is shown anymore. Only the SS symbol turns.

I have not yet been able to determine whether other areas will no longer work after the URL change.

I ask for information whether someone has already run the admin URL rewriting without errors. Or a few tips on what other configurations are necessary.

Thank you!

There’s an open issue related to this:

Hi there!

Many thanks for the answer. I already know this issue, but I didn’t link it to my problem because I don’t have a 500 error.
Then it is currently the case that the admin URL cannot be rewritten.

Greetings RALF