Clarification for htaccess.RewriteBase: For folders or urls?
The docs on htaccess.RewriteBase have the following paragraph:
In a standard Apache setup this usually equals the folder that Nextcloud is accessible at. So if Nextcloud is accessible via âhttps://mycloud.org/nextcloudâ the correct value would most likely be â/nextcloudâ. If Nextcloud is running under âhttps://mycloud.org/â then it would be â/â.
Initially, it talks about the folder, then it gives an example about URLs. Usually this is interchangeable, but I am not sure if that is true here.
I had a proxy where domain.com/nextcloud/ is redirected to localhost:8080/ where Nextcloud is hosted. I read the documentation and set htaccess.RewriteBase to /nextcloud, however I was facing infinite redirects when doing so. In the error logs I could see that /nextcloud/config.php was infinitely redirected to /nextcloud/config.php. Then I changed htaccess.RewriteBase to / and everything worked again.
So maybe it is better to put emphasis that Nextcloud really is in a "/nextcloud" folder in your Apache setup. Not that it is accessible under the URL "/nextcloud". (Which can be redirected eventually.)