Remove index.php from Nextcloud URL

Normally this should work directly, but with some hosts it happens that the Nextcloud URL constantly has an index.php in the URL. It doesn’t have to be. So here is a quick hotfix.

Open your config.php. It is located in your nextcloud installation under config/config.php. Just add following to the config:

'htaccess.RewriteBase' => '/',

Now open your shell, go to the root of your nextcloud installation and drop following:

./occ maintenance:update:htaccess

If you get the following as result:

bash: ./occ: Permission denied

Then occ need rights to execute. You can give occ rights with chmod:

chmod +x occ

Leave a Reply

Your email address will not be published. Required fields are marked *