Removing index.php from the Nextcloud URI

This works on CentOS 7!

Add this to your config.php

'htaccess.RewriteBase' => '/' (Path depends on your configuration - maybe /nextcloud)

Update htaccess with the occ command
sudo -u apache php occ maintenance:update:htaccess

Make sure all modules are enabled with
cat /etc/httpd/conf.modules.d/* | grep mod_env
and
cat /etc/httpd/conf.modules.d/* | grep mod_rewrite

The output line should not start with #

I also restarted my httpd
systemctl restart httpd

6 Likes