This question was asked in October 2023, but I can’t see the answer in what was posted there.
Problem: I am building a new MODX website in a subfolder temporarily, and for a while it was working perfectly by using a URL like https://domainname.com/new24/ Suddenly the home page stopped loading and instead all attempts to load the home page were redirected to the “root” (?) https://domainname.com The manager works fine, and if I load a resource for a page that is not the home page and click View, it loads that page in a new tab fine, and from there I can see all the other pages normally except the home page, which always redirects to the home page outside the new folder (the old home page).
The htaccess file is:
RewriteEngine On
RewriteBase /new24
DirectoryIndex index.php index.html
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} ^www.(.)$ [NC]
RewriteRule ^(.)$ https://%1/$1 [R=301,L]
RewriteCond %{HTTPS} !=on [OR]
RewriteCond %{SERVER_PORT} !^443
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
#block core access
RewriteCond %{HTTP_HOST} ^(www.)?thalassagarden.com/$ [NC]
RewriteRule ^(.(?!well_known)|_build|_gitify|_backup|core|config.core.php) /index.php?q=doesnotexist [L,R=404]
The Friendly URLs part
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
The site settings set the site start to resource with id 36.
The alias for id 1 resource is “home” and for 36 it is “test-home-page”. Both load normally if not set to be the site start, and both get redirected if set to be site start.
In the new24 folder there is no other index file, only the standard modx index.php file from the 3.0.5 package. The root outside the new24 folder has an index.html, but when I delete that the redirection continues so appears to be irrelevant.
What am I overlooking?