Error 500 after update v5.5.33 to v5.5.40

Here I described my update routine incl. fixing .htaccess-Files for working with subdomains…

Cannot update system because pdf is not writable - Self-Hosted | v5 - Discourse (invoiceninja.com)

.htaccess

<IfModule mod_rewrite.c>
  # Redirect HTTP to HTTPS:
  RewriteCond %{ENV:HTTPS} !=on
  RewriteRule ^(.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  
  # Make InvoiceNinja work in subdomains:
  RewriteBase /
  RewriteRule ^(.*)$ public/$1 [L]
  
  RewriteRule "^.env" - [F,L]
#  RewriteRule "^storage" - [F,L]
  RewriteRule ^(.well-known)($|/) - [L]
  
  RewriteRule ^(.*)$ public/$1 [L]
</IfModule>

public/.htaccess

<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews -Indexes
    </IfModule>

    RewriteEngine On
	
	# Make InvoiceNinja work with subdomains:
	# If you want to access InvoiceNinja via a subdomain and
	# this rule is missing the browser will see a `500 internal server error`.
	RewriteBase /

    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} (.+)/$
    RewriteRule ^ %1 [L,R=301]

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
1 Like