Just add one line before the RewriteRule :
RewriteCond %{REQUEST_FILENAME} !-f
This means that if your uri request points to an existing file, then the next RewriteRule will not start.
If you need another way, then you need to do this:
RewriteCond %{REQUEST_FILENAME} !\.(css|js|png|jpg)$
You can add additional extensions, separated by a pole ( | )
source share