4.4.1 redirects to DocumentRoot instead of SS_BASE_URL

Silverstripe Version: 4.4.0 and 4.4.1
Wamp: 3.1.13
Apache: 2.4.33
PHP: 7.2.4
MySQL: 5.7.21
MariaDB: 10.2.14

Question: Why do I get redirected to DocumentRoot instead of SS_BASE_URL, unlike previous versions?

After a successful install of SilverStripe 4.4.1, I get auto-redirected to DocumentRoot instead of the project’s base url. I can navigate back to the correct sub-directory and everything functions as normal.

This issue does not occur in versions 4.2.0, 4.3.0, and 4.3.3

My DocumentRoot is C:\wamp\www reachable at 127.0.0.1
Version 3.4.4 is in C:\wamp\www\344\ and is reachable at 127.0.0.1/334/
Version 4.4.1 is in C:\wamp\www\441\ and is reachable at 127.0.0.1/441/

They were obtained through composer like so:

C:\wamp\www>composer create-project silverstripe/installer 433 4.3.3
C:\wamp\www>composer create-project silverstripe/installer 441 4.4.1

My DocumentRoot’s index.php is a welcome page with links that takes you to either version.

The following illustrates each step in the installation process:


Step-by-step on version 4.3.3 click for full image
SS-344

4.3.3 installs successfully and redirects correctly.


Step-by-step on version: 4.4.1 click for full image
SS-441

4.4.1 installs successfully but redirects to DocumentRoot. I manually type in the missing sub-directory to get to the last step.


I would also like to note that if I do flush=all while not in dev mode, I get redirected to DocumentRoot and with a urlspecialstoken, but if I manually type in the missing sub-directory and with the provided urlspecialstoken, it will flush successfully.

Thank you for the detailed explanation. I have logged a GitHub ticket for the issue.


The reason for that is the new confirmation functionality that requires user confirmation for potentially dangerous operations.

When the install.php script finishes, it performs a redirect with flush. When you flush manually (with flush=all) not in dev mode, the same middleware kicks in, performs flush and makes a redirect.

It appears the SS_BASE_URL is not handled properly by the middleware redirecting back after the flush operation.

1 Like