I have a SPA that resides in a subfolder on a website that this .htaccess redirect works fine for
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . ./ [L]
Basically if the file or directory doesn't already exist point it back to the route of the directory.
However, I wanted to add this to the rewrite rules
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteCond %{REQUEST_FILENAME}.gz -f
RewriteRule ^(.*)$ $1.gz [R=307,L]
Which would check to see if there is a .gz version of a file and serve that instead.
I've tried everything I can think of, but haven't found a way to get this to work as expected.