You can add a condition to exclude URLs that can be mapped to actually existing files:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^.* controller.php
The keyword -fwill check if the absolute path in the %{REQUEST_FILENAME}path to the existing regular file in the file system !-fis only the reverse.
, , :
RewriteCond $0 !^(assets|foo|bar)/
RewriteRule ^.* controller.php
, RewriteRule ( $0) assets/, foo/, bar/. , RewriteRule:
RewriteRule !^(assets|foo|bar)/ controller.php