htaccess.RewriteBase with php-fpm breaks SVG elements called from core.js

Hi everyone,
I am currently trying out NextCloud 12.0.2 and everything is working fine so far, except one detail.

I have tried enabling Pretty URLs by following the instructions:

  • I made sure that mod_rewrite and mov_rewrite are active
  • I added the following to config.php:
    ‘overwrite.cli.url’ => ‘https:// mydomain/nextcloud/’,
    ‘htaccess.RewriteBase’ => ‘/nextcloud/’,
  • I ran sudo -u myuser /opt/cpanel/ea-php71/root/usr/bin/php occ maintenance:update:htaccess
  • I verified that the relevant parameters have been added to my /nextcloud/.htaccess:
    RewriteRule . index.php [PT,E=PATH_INFO:$1]
    RewriteBase /nextcloud/

My login URL is now indeed without index.php and I can log in properly, so something is working. But the layout is broken and most SVG files cannot be accessed.

I checked with Chrome developer tools and I can see that “core.js” is calling a lot of elements without the /nextcloud/ part in front of the URL. For example https:// mydomain/core/img/actions/add.svg?v=1 instead of https:// mydomain/core/img/actions/add.svg?v=1. This leads to a 404 not found.

I am on PHP 7.1.8 with Zend OPcache and APCu enabled. I also have php-fpm enabled and I’m managing the setup with cPanel.

Has anyone encountered this issue before?


PS: disregard the blank spaces after “https”, I had to do this because I am not allowed to post more than 2 links in the forum as a new user…

This error made it already to github:

Add 'htaccess.IgnoreFrontController' => true, to your config.php to resolve it. Should work, otherwise try to switch your theming app: turn it off, if it’s on, and turn it on, if it’s off.

1 Like

Amazing, thank you for pointing me to the right github issue. Despite all my Google-fu, I was unable to find it.

So anyhow, the IgnoreFrontController directive didn’t cut it (I had tried that already). I had to turn off the theming app - or else turn it on and actually change something in the default theme.

The issue only presents for me when the theming app is enabled with default settings.

Thanks a lot!