In case the automatically added .htaccess configuration SetEnv front_controller_active true does not work for your environment:
Edit config/config.php and add 'htaccess.IgnoreFrontController' => true.
See Configuration Parameters — Nextcloud latest Administration Manual latest documentation for a detailed description.
Also see:
- Remove index.php in Url on Hosted Nextcloud
- Apache rewrite to remove index.php
- Apache: Cant remove "index.php" from my url
- Remove "index.php" from URI
PR for docs: